From: Frantisek Sumsal Date: Mon, 15 Apr 2024 18:52:59 +0000 (+0200) Subject: test: simplify unit check X-Git-Tag: v256-rc1~165^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f42fae2f15e77321444d3df741482a6e8dac80b;p=thirdparty%2Fsystemd.git test: simplify unit check --- diff --git a/test/units/testsuite-50.dissect.sh b/test/units/testsuite-50.dissect.sh index a1c1c42b968..34e60aa76f0 100755 --- a/test/units/testsuite-50.dissect.sh +++ b/test/units/testsuite-50.dissect.sh @@ -318,12 +318,8 @@ mksquashfs /tmp/wrong/foo /tmp/wrong.raw systemctl mount-image --mkdir testservice-50d.service /tmp/wrong.raw /tmp/img test "$(systemctl show -P SubState testservice-50d.service)" = "running" systemctl mount-image --mkdir testservice-50d.service "$MINIMAL_IMAGE.raw" /tmp/img root:nosuid - -while systemctl show -P SubState testservice-50d.service | grep -q running -do - sleep 0.1 -done - +# shellcheck disable=SC2016 +timeout 30s bash -xec 'while [[ $(systemctl show -P SubState testservice-50d.service) == running ]]; do sleep .2; done' systemctl is-active testservice-50d.service # ExtensionImages will set up an overlay