From 8ee32f688fa864a04c5c94fd9c3dbea00cffdc07 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Fri, 26 Jan 2024 15:44:39 +0100 Subject: [PATCH] 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. --- test/TEST-13-NSPAWN/test.sh | 1 + test/units/testsuite-13.nspawn.sh | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) 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 ]] -[[ "$(