diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-01-25 23:20:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-25 23:20:53 +0100 |
commit | b902ad9375eb77ebc75f4d0742764e02250bc5c5 (patch) | |
tree | c3aae7878ba1dfe251ae0e7d5c7272973f7ee35c /test/system/400-unprivileged-access.bats | |
parent | 63cef43f0cfae9bffc5d1dde321121f222cbfb6a (diff) | |
parent | 33179c281e83ebd397e0aca046a3655580aee8f7 (diff) | |
download | podman-b902ad9375eb77ebc75f4d0742764e02250bc5c5.tar.gz podman-b902ad9375eb77ebc75f4d0742764e02250bc5c5.tar.bz2 podman-b902ad9375eb77ebc75f4d0742764e02250bc5c5.zip |
Merge pull request #9091 from edsantiago/more_bats
System tests: cover gaps from the last month
Diffstat (limited to 'test/system/400-unprivileged-access.bats')
-rw-r--r-- | test/system/400-unprivileged-access.bats | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/system/400-unprivileged-access.bats b/test/system/400-unprivileged-access.bats index 6a89247e6..f26c97d1e 100644 --- a/test/system/400-unprivileged-access.bats +++ b/test/system/400-unprivileged-access.bats @@ -132,7 +132,11 @@ EOF # Run 'stat' on all the files, plus /dev/null. Get path, file type, # number of links, major, and minor (see below for why). Do it all # in one go, to avoid multiple podman-runs - run_podman run --rm $IMAGE stat -c'%n:%F:%h:%T:%t' /dev/null ${subset[@]} + run_podman '?' run --rm $IMAGE stat -c'%n:%F:%h:%T:%t' /dev/null ${subset[@]} + if [[ $status -gt 1 ]]; then + die "Unexpected exit status $status: expected 0 or 1" + fi + local devnull= for result in "${lines[@]}"; do # e.g. /proc/acpi:character special file:1:3:1 @@ -161,6 +165,11 @@ EOF # If you can think of a better way to do this check, # please feel free to fix it. is "$nlinks" "2" "$path: directory link count" + elif [[ $result =~ stat:.*No.such.file.or.directory ]]; then + # No matter what the path is, this is OK. It has to do with #8949 + # and RHEL8 and rootless and cgroups v1. Bottom line, what we care + # about is that the path not be available inside the container. + : else die "$path: Unknown file type '$type'" fi |