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