From: Frantisek Sumsal Date: Fri, 26 Jan 2024 14:44:39 +0000 (+0100) Subject: test: fix the container ID check X-Git-Tag: v256-rc1~1027^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ee32f688fa864a04c5c94fd9c3dbea00cffdc07;p=thirdparty%2Fsystemd.git test: fix the container ID check It never worked, but the fail was masked by missing set -e, see the previous commit. Also, throw env into the test container and dump the environment on container start, to make potential failures easier to debug. --- diff --git a/test/TEST-13-NSPAWN/test.sh b/test/TEST-13-NSPAWN/test.sh index 28d845c94bd..6dfb5277183 100755 --- a/test/TEST-13-NSPAWN/test.sh +++ b/test/TEST-13-NSPAWN/test.sh @@ -22,6 +22,7 @@ test_append_files() { initdir="$container" setup_basic_dirs initdir="$container" image_install \ bash \ + env \ cat \ hostname \ grep \ diff --git a/test/units/testsuite-13.nspawn.sh b/test/units/testsuite-13.nspawn.sh index 6647ac8b276..79ee239d8d7 100755 --- a/test/units/testsuite-13.nspawn.sh +++ b/test/units/testsuite-13.nspawn.sh @@ -414,6 +414,8 @@ EOF #!/bin/bash set -ex +env + [[ "$1" == "foo bar" ]] [[ "$2" == "bar baz" ]] @@ -421,7 +423,7 @@ set -ex [[ "$FOO" == bar ]] [[ "$BAZ" == "hello world" ]] [[ "$PWD" == /tmp ]] -[[ "$(