mirror of
https://github.com/containers/podman.git
synced 2025-10-17 03:04:21 +08:00
test/system: skip idmapped mount correctly
The full error message is: failed to create idmapped mount: mount_setattr /tmp/CI_SKPI/podman_bats.RX6gD9/rootfs: invalid argument So in order to match this account for the variable part. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -1465,7 +1465,9 @@ EOF
|
|||||||
# check if the underlying file system supports idmapped mounts
|
# check if the underlying file system supports idmapped mounts
|
||||||
run_podman '?' run --security-opt label=disable --rm --uidmap=0:1000:10000 --rootfs $romount:idmap true
|
run_podman '?' run --security-opt label=disable --rm --uidmap=0:1000:10000 --rootfs $romount:idmap true
|
||||||
if [[ $status -ne 0 ]]; then
|
if [[ $status -ne 0 ]]; then
|
||||||
if [[ "$output" =~ "failed to create idmapped mount: invalid argument" ]]; then
|
# Note bash regex only works if the right hand side is unquoted so we have to use this extra var.
|
||||||
|
match="failed to create idmapped mount.* invalid argument"
|
||||||
|
if [[ "$output" =~ $match ]]; then
|
||||||
skip "idmapped mounts not supported"
|
skip "idmapped mounts not supported"
|
||||||
fi
|
fi
|
||||||
# Any other error is fatal
|
# Any other error is fatal
|
||||||
|
Reference in New Issue
Block a user