From 5d4157c6655aea0673a60894420a9d5a0fa63dd6 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 9 Jun 2023 09:38:35 +0000 Subject: [PATCH] tests: Always dump the environment Signed-off-by: Michael Tremer --- test/networkd/test.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/networkd/test.sh b/test/networkd/test.sh index 7690978d..9cecf0a4 100644 --- a/test/networkd/test.sh +++ b/test/networkd/test.sh @@ -64,6 +64,9 @@ launch_networkd() { echo "networkd launched as PID ${networkd_PID}" + # Wait until networkd is initialized + # XXX Calling sleep(8) is very racy and should be replaced by something that + # waits until networkd has connected to dbus sleep 1 } @@ -100,6 +103,9 @@ terminate_networkd() { fi } +# Collect some status information +trap dump_status EXIT + main() { local test="${1}" shift @@ -128,9 +134,6 @@ main() { # Terminate networkd terminate_networkd - # Collect some status information - dump_status - # Run cleanup script if ! run_script "${test}/cleanup.sh"; then return 1 -- 2.47.3