From 163d095fc31f350b27af0d0e5d26314b6cc37658 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 9 Jul 2022 11:59:38 +0900 Subject: [PATCH] test-network: disable debugging logs from networkctl, resolvectl, and so on --- test/test-network/systemd-networkd-tests.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index eb93440851..a09396f52e 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -52,6 +52,7 @@ timedatectl_bin=shutil.which('timedatectl', path=which_paths) use_valgrind=False enable_debug=True env = {} +wait_online_env = {} asan_options=None lsan_options=None ubsan_options=None @@ -691,7 +692,7 @@ class Utilities(): if ipv6: args += ['--ipv6'] try: - check_output(*args, env=env) + check_output(*args, env=wait_online_env) except subprocess.CalledProcessError: for link in links_with_operstate: name = link.split(':')[0] @@ -5712,8 +5713,6 @@ if __name__ == '__main__': timedatectl_cmd = [timedatectl_bin] wait_online_cmd = [wait_online_bin] - if enable_debug: - env.update({ 'SYSTEMD_LOG_LEVEL' : 'debug' }) if asan_options: env.update({ 'ASAN_OPTIONS' : asan_options }) if lsan_options: @@ -5721,5 +5720,9 @@ if __name__ == '__main__': if ubsan_options: env.update({ 'UBSAN_OPTIONS' : ubsan_options }) + wait_online_env = env.copy() + if enable_debug: + wait_online_env.update({ 'SYSTEMD_LOG_LEVEL' : 'debug' }) + sys.argv[1:] = unknown_args unittest.main(verbosity=3)