From 951fba5cd13092b41e4085878ffeee1145cb572d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 14 Jan 2009 00:12:56 +0100 Subject: [PATCH] Avoid test-copy-file.sh failures when ACL support insufficient. --- ChangeLog | 8 ++++++++ modules/copy-file-tests | 2 +- tests/test-copy-file.sh | 8 +++++--- 3 files changed, 14 insertions(+), 4 deletions(-) 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` -- 2.30.2