dcavalca / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone
ac3a84
From d2ccb0bf2b2078e13fc4cb1c2e2eb8079fa57df0 Mon Sep 17 00:00:00 2001
ac3a84
From: Frantisek Sumsal <fsumsal@redhat.com>
ac3a84
Date: Thu, 24 Nov 2022 15:19:59 +0100
ac3a84
Subject: [PATCH] test: accept EPERM for unavailable idmapped mounts as well
ac3a84
ac3a84
Follow-up for 3c54c67a7fc65dc5b49b2452739c19b94eeb98a9.
ac3a84
ac3a84
rhel-only
ac3a84
Related: #2138081
ac3a84
---
ac3a84
 test/units/testsuite-13.sh | 2 +-
ac3a84
 1 file changed, 1 insertion(+), 1 deletion(-)
ac3a84
ac3a84
diff --git a/test/units/testsuite-13.sh b/test/units/testsuite-13.sh
ac3a84
index 4ad7431e42..2b6e6df8a3 100755
ac3a84
--- a/test/units/testsuite-13.sh
ac3a84
+++ b/test/units/testsuite-13.sh
ac3a84
@@ -74,7 +74,7 @@ function check_rootidmap {
ac3a84
             --register=no -D "$_root" \
ac3a84
             --bind=/tmp/rootidmapdir:/mnt:rootidmap \
ac3a84
             /bin/sh -c "$_command" |& tee nspawn.out; then
ac3a84
-        if grep -q "Failed to map ids for bind mount.*: Function not implemented" nspawn.out; then
ac3a84
+        if grep -Eq "Failed to map ids for bind mount.*: (Function not implemented|Operation not permitted)" nspawn.out; then
ac3a84
             echo "idmapped mounts are not supported, skipping the test..."
ac3a84
             return 0
ac3a84
         fi