From 52fcdcf64cc9c560eb5c3a25b8f7b59e23c05ba7 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 10 Sep 2025 13:29:58 +0200 Subject: [PATCH] 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 --- test/system/030-run.bats | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/system/030-run.bats b/test/system/030-run.bats index 35389284ee..f0f3725ee5 100644 --- a/test/system/030-run.bats +++ b/test/system/030-run.bats @@ -1465,7 +1465,9 @@ EOF # 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 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" fi # Any other error is fatal