Collin Funk <[email protected]> writes:
>
> Those changes look good.
>
> Do you seee tests/cp/capability.sh fail too? It failed in my podman
> container.
>
> I think I have an idea to fix it without skipping the entire test.

This diff lets it pass in the container. However, I'm not sure how I
feel about basing it entirely on the return value. I also don't want to
duplicate that 'id -Z 0 2>&1 | ...' invocation and have another place
for it to go out of sync. WDYT?

diff --git a/tests/cp/capability.sh b/tests/cp/capability.sh
index 2efdfda3f..b5d0bc256 100755
--- a/tests/cp/capability.sh
+++ b/tests/cp/capability.sh
@@ -20,6 +20,7 @@
 print_ver_ cp
 require_root_
 working_umask_or_skip_
+getlimits_
 
 
 grep '^#define HAVE_CAP 1' $CONFIG_HEADER > /dev/null \
@@ -51,6 +52,11 @@ EOF
   compare exp err || fail=1
   test "$ret" = 1 || fail=1
   returns_ 1 test -f copy1 || fail=1
+elif test "$ret" = 1; then
+  cat <<EOF >exp || framework_failure_
+cp: setting attributes for 'copy1': $ENOTSUP
+EOF
+  compare exp err || fail=1
 else
   compare /dev/null err || fail=1
   test "$ret" = 0 || fail=1

Collin

Reply via email to