]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: show systemd-networkd.service 12707/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 31 May 2019 04:54:08 +0000 (13:54 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 31 May 2019 04:58:27 +0000 (13:58 +0900)
As there may exist some other drop-in configs.

test/test-network/systemd-networkd-tests.py

index 692bd19159fdfc89ffcc49e62401a704edde9955..335e3215f292c7df3314415d1e5ba61ad2f7a34c 100755 (executable)
@@ -112,14 +112,13 @@ def setUpModule():
     if use_valgrind or asan_options or lsan_options or ubsan_options:
         drop_in += ['MemoryDenyWriteExecute=no']
 
-    drop_in_str = '\n'.join(drop_in)
-    print(drop_in_str)
-
     os.makedirs('/run/systemd/system/systemd-networkd.service.d', exist_ok=True)
     with open('/run/systemd/system/systemd-networkd.service.d/00-override.conf', mode='w') as f:
-        f.write(drop_in_str)
+        f.write('\n'.join(drop_in))
 
     subprocess.check_call('systemctl daemon-reload', shell=True)
+    output = subprocess.check_output(['systemctl', 'cat', 'systemd-networkd.service'], universal_newlines=True).rstrip()
+    print(output)
 
 def tearDownModule():
     shutil.rmtree(networkd_ci_path)