1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

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.
This commit is contained in:
Frantisek Sumsal 2024-01-26 15:44:39 +01:00
parent 7b1c292953
commit 8ee32f688f
2 changed files with 4 additions and 1 deletions

View File

@ -22,6 +22,7 @@ test_append_files() {
initdir="$container" setup_basic_dirs
initdir="$container" image_install \
bash \
env \
cat \
hostname \
grep \

View File

@ -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 ]]
[[ "$(</etc/machine-id)" == f28f129b51874b1280a89421ec4b4ad4 ]]
[[ "$container_uuid" == f28f129b-5187-4b12-80a8-9421ec4b4ad4 ]]
[[ "$(ulimit -S -n)" -eq 1024 ]]
[[ "$(ulimit -H -n)" -eq 2048 ]]
[[ "$(ulimit -S -r)" -eq 8 ]]