From: Luca Boccassi Date: Sat, 15 Nov 2025 00:37:58 +0000 (+0000) Subject: test: always create networkd mock tmpfs for networkd-test.py X-Git-Tag: v259-rc1~43^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f041d40dee1f99e271d61fbfd9e048d5ca229981;p=thirdparty%2Fsystemd.git 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. --- diff --git a/test/networkd-test.py b/test/networkd-test.py index c8225119741..8ea6cd43a06 100755 --- a/test/networkd-test.py +++ b/test/networkd-test.py @@ -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')