summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-01-26 19:16:45 +0100
committerGitHub <noreply@github.com>2021-01-26 19:16:45 +0100
commit44bd96330970a538f170f786672a7d6c6ebe866c (patch)
tree39df0678fcd4e36b7c7d3e4107b11f3348a25874
parent715a7518a793f5790e4c7db4600f03447915c037 (diff)
parent377c412768de4ece52d827beca02bc73ebb475fa (diff)
downloadpodman-44bd96330970a538f170f786672a7d6c6ebe866c.tar.gz
podman-44bd96330970a538f170f786672a7d6c6ebe866c.tar.bz2
podman-44bd96330970a538f170f786672a7d6c6ebe866c.zip
Merge pull request #9108 from edsantiago/fix_rhel_sys_gating_tests
[v3.0] fix RHEL gating test: the /sys thing
-rw-r--r--test/system/400-unprivileged-access.bats11
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