From fb4c560196c363bdedf82dcbf09a23db045a90a5 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 30 Oct 2023 11:40:30 +0100 Subject: [PATCH] test: shellcheck fixes to new test Signed-off-by: Joachim Wiberg --- test/unexpected-restart.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test/unexpected-restart.sh b/test/unexpected-restart.sh index c15b54d0..033d5c00 100755 --- a/test/unexpected-restart.sh +++ b/test/unexpected-restart.sh @@ -30,17 +30,18 @@ test_teardown() pidof() { - texec initctl status $1 -j|jq .pid + texec initctl -j status "$1" | jq .pid } +# shellcheck source=/dev/null . "$TEST_DIR/lib/setup.sh" - -sep -say "finit config:" +sep "$FINIT_CONF" run "cat $FINIT_CONF" sep run "initctl reload" +run "initctl status" +sep say "waiting for primary startup to complete" retry 'assert_status allup "done"' 100 1 @@ -49,12 +50,12 @@ oldpid=$(pidof C) assert_status D "running" doldpid=$(pidof D) -say "pre-reload status" +sep "pre-reload status" run "initctl status" sep -# toggle_finit_debug say "Reload Finit, who gets restarted?" +#run "initctl debug" run "initctl reload" sleep 2 @@ -64,7 +65,9 @@ assert_status C "running" assert_status D "running" newpid=$(pidof C) +# shellcheck disable=SC2086 assert "C was not restarted" $oldpid -eq $newpid dnewpid=$(pidof D) +# shellcheck disable=SC2086 assert "D was not restarted" $doldpid -eq $dnewpid