From 342a69f147ab0add68f2c36562dd20f2ad65e2eb Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Oct 09 2019 14:10:13 +0000 Subject: Gating tests: use loginctl, dump env - instead of hacky mkdir /run/user/, use loginctl enable-linger and hope that it has the same effect. reason: the mkdir doesn't seem to be 100% effective. There are cases in which the first rootless podman invocation fails with: Error: could not get runtime: cannot mkdir /run/user/1000/libpod: mkdir /run/user/1000/libpod: no such file or directory - for future spelunking, dump environment at start of each test (both root and rootless). Suggested by Giuseppe. Signed-off-by: Ed Santiago --- diff --git a/tests/test_podman.sh b/tests/test_podman.sh index 47c382f..1f7b3f7 100755 --- a/tests/test_podman.sh +++ b/tests/test_podman.sh @@ -10,4 +10,8 @@ echo "Important package versions:" rpm -qa | egrep 'podman|conmon|crun|runc|iptable|slirp|systemd' | sort ) | sed -e 's/^/ /' +# Log environment; or at least the useful bits +echo "Environment:" +env | grep -v LS_COLORS= | sort | sed -e 's/^/ /' + bats /usr/share/podman/test/system diff --git a/tests/test_podman.yml b/tests/test_podman.yml index c73bf48..7002972 100644 --- a/tests/test_podman.yml +++ b/tests/test_podman.yml @@ -18,5 +18,5 @@ # running the test with su doesn't create the directory for fedora user on /run/user/ # so create it manually dir: ./ - run: mkdir /run/user/$(id -u fedora); su -c ${PWD}/test_podman.sh - fedora + run: loginctl enable-linger fedora; su -c ${PWD}/test_podman.sh - fedora timeout: 15m