diff options
author | Ed Santiago <santiago@redhat.com> | 2021-10-28 19:04:06 -0600 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2021-11-01 13:03:05 -0600 |
commit | 7b2531c135c52e9d60fdd0ae74c5957b2456631f (patch) | |
tree | 10a5180e82842dcb6a36e57524b02ba6434f7172 | |
parent | 85bad0cc7c68b71ab7ddb6ed09b862145c6c6d0e (diff) | |
download | podman-7b2531c135c52e9d60fdd0ae74c5957b2456631f.tar.gz podman-7b2531c135c52e9d60fdd0ae74c5957b2456631f.tar.bz2 podman-7b2531c135c52e9d60fdd0ae74c5957b2456631f.zip |
System tests: enhance volume test, add debug prints
Volume test: add a sequence of stat()s to confirm that volumes
are mounted as a different device than root.
Network test: add debugging code for #11825 (dnsmasq inotify
failure in bodhi only).
Signed-off-by: Ed Santiago <santiago@redhat.com>
-rw-r--r-- | test/system/070-build.bats | 20 | ||||
-rw-r--r-- | test/system/500-networking.bats | 8 |
2 files changed, 28 insertions, 0 deletions
diff --git a/test/system/070-build.bats b/test/system/070-build.bats index 1d24eef15..3c47b1f5b 100644 --- a/test/system/070-build.bats +++ b/test/system/070-build.bats @@ -39,6 +39,7 @@ EOF cat >$dockerfile <<EOF FROM $IMAGE RUN echo $rand_content > /$rand_filename +VOLUME /a/b/c VOLUME ['/etc/foo', '/etc/bar'] EOF @@ -56,6 +57,25 @@ EOF /\[/etc/foo, /etc/bar]" "weird VOLUME gets converted to directories with brackets and comma" + # Now confirm that each volume got a unique device ID + run_podman run --rm build_test stat -c '%D' / /a /a/b /a/b/c /\[ /\[/etc /\[/etc/foo, /etc /etc/bar\] + # First, the non-volumes should all be the same... + is "${lines[0]}" "${lines[1]}" "devnum( / ) = devnum( /a )" + is "${lines[0]}" "${lines[2]}" "devnum( / ) = devnum( /a/b )" + is "${lines[0]}" "${lines[4]}" "devnum( / ) = devnum( /[ )" + is "${lines[0]}" "${lines[5]}" "devnum( / ) = devnum( /[etc )" + is "${lines[0]}" "${lines[7]}" "devnum( / ) = devnum( /etc )" + is "${lines[6]}" "${lines[8]}" "devnum( /[etc/foo, ) = devnum( /etc/bar] )" + # ...then, each volume should be different + if [[ "${lines[0]}" = "${lines[3]}" ]]; then + die "devnum( / ) (${lines[0]}) = devnum( volume0 ) (${lines[3]}) -- they should differ" + fi + if [[ "${lines[0]}" = "${lines[6]}" ]]; then + die "devnum( / ) (${lines[0]}) = devnum( volume1 ) (${lines[6]}) -- they should differ" + fi + # FIXME: is this expected? I thought /a/b/c and /[etc/foo, would differ + is "${lines[3]}" "${lines[6]}" "devnum( volume0 ) = devnum( volume1 )" + run_podman rmi -f build_test } diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats index cb73cf24d..b3471b425 100644 --- a/test/system/500-networking.bats +++ b/test/system/500-networking.bats @@ -444,6 +444,14 @@ load helpers die "MAC address did not change after podman network disconnect/connect" fi + # FIXME FIXME FIXME: #11825: bodhi tests are failing, remote+rootless only, + # with "dnsmasq: failed to create inotify". This error has never occurred + # in CI, and Ed has been unable to reproduce it on 1minutetip. This next + # line is a suggestion from Paul Holzinger for trying to shed light on + # the system context before the failure. This output will be invisible + # if the test passes. + for foo in /proc/\*/fd/*; do readlink -f $foo; done |grep '^/proc/.*inotify' |cut -d/ -f3 | xargs -I '{}' -- ps --no-headers -o '%p %U %a' -p '{}' |uniq -c |sort -n + # connect a second network run_podman network connect $netname2 $cid |