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>
This commit is contained in:
Ricardo Branco 2026-03-21 21:43:37 +01:00
parent 0eeff22607
commit b77531879b
No known key found for this signature in database

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