mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
test: always create networkd mock tmpfs for networkd-test.py
Match the behaviour of the other test classes that use sd-run and always create the mock tmpfs runtime dirs. This will be needed as the new resolve.hook directory won't exist on boot but will be needed by the test case.
This commit is contained in:
committed by
Lennart Poettering
parent
4408db6908
commit
f041d40dee
@@ -91,9 +91,8 @@ def setUpModule():
|
||||
|
||||
for d in ['/etc/systemd/network', '/run/systemd/network',
|
||||
'/run/systemd/netif', '/run/systemd/resolve']:
|
||||
if os.path.isdir(d):
|
||||
subprocess.check_call(["mount", "-t", "tmpfs", "none", d])
|
||||
tmpmounts.append(d)
|
||||
subprocess.check_call(["mount", "-m", "-t", "tmpfs", "none", d])
|
||||
tmpmounts.append(d)
|
||||
if os.path.isdir('/run/systemd/resolve'):
|
||||
os.chmod('/run/systemd/resolve', 0o755)
|
||||
shutil.chown('/run/systemd/resolve', 'systemd-resolve', 'systemd-resolve')
|
||||
|
||||
Reference in New Issue
Block a user