test: relax rootless runc pid namespace assertion

runc may or may not issue a warning here.

https://github.com/opencontainers/runc/issues/4732

Signed-off-by: Ricardo Branco <rbranco@suse.de>
(cherry picked from commit b77531879b)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Ricardo Branco
2026-03-21 21:43:37 +01:00
committed by Paul Holzinger
parent 26047f43b5
commit c91cd99291

View File

@@ -41,7 +41,7 @@ uts | uts
if [[ "$option" = "pid" ]] && is_rootless && ! is_remote && [[ "$(podman_runtime)" = "runc" ]]; then
# Replace "pid:[1234567]" with "pid:\[1234567\]"
con1_ns_esc="${con1_ns//[\[\]]/\\&}"
assert "$con2_ns" =~ "${con1_ns_esc}.*warning .*" "($name) namespace matches (type: $type)"
assert "$con2_ns" =~ "${con1_ns_esc}" "($name) namespace matches (type: $type)"
else
assert "$con1_ns" == "$con2_ns" "($name) namespace matches (type: $type)"
fi