From: Bruno Haible Date: Tue, 13 Jan 2009 23:12:56 +0000 (+0100) Subject: Avoid test-copy-file.sh failures when ACL support insufficient. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=951fba5cd13092b41e4085878ffeee1145cb572d;p=pspp Avoid test-copy-file.sh failures when ACL support insufficient. --- diff --git a/ChangeLog b/ChangeLog index dc6ba3b9d7..c437096026 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-01-13 Bruno Haible + + Avoid test-copy-file.sh failures when ACL support insufficient. + * modules/copy-file-tests (Makefile.am): Pass USE_ACL in + TESTS_ENVIRONMENT. + * tests/test-copy-file.sh: Skip the ACL comparisons if USE_ACL is 0. + Reported by Jim Meyering. + 2009-01-13 Bruno Haible * modules/unistdio/u-printf-args (Files): Add m4/stdint_h.m4 and diff --git a/modules/copy-file-tests b/modules/copy-file-tests index 2d61064010..a683dee251 100644 --- a/modules/copy-file-tests +++ b/modules/copy-file-tests @@ -13,6 +13,6 @@ configure.ac: Makefile.am: TESTS += test-copy-file.sh -TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' +TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' USE_ACL=$(USE_ACL) check_PROGRAMS += test-copy-file test_copy_file_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@ diff --git a/tests/test-copy-file.sh b/tests/test-copy-file.sh index 58f9df455e..ad7da7be1d 100755 --- a/tests/test-copy-file.sh +++ b/tests/test-copy-file.sh @@ -172,13 +172,15 @@ cd "$builddir" || func_test_copy () { "$builddir"/test-copy-file${EXEEXT} "$1" "$2" || exit 1 - "$builddir"/test-sameacls${EXEEXT} "$1" "$2" || exit 1 - func_test_same_acls "$1" "$2" || exit 1 + if test "$USE_ACL" != 0; then + "$builddir"/test-sameacls${EXEEXT} "$1" "$2" || exit 1 + func_test_same_acls "$1" "$2" || exit 1 + fi } func_test_copy tmpfile0 tmpfile1 - if test $acl_flavor != none; then + if test "$USE_ACL" != 0 && test $acl_flavor != none; then # Use a user and group id different from the current one, to avoid # redundant/ambiguous ACLs. myuid=`id -u`