90 lines
2.5 KiB
Diff
90 lines
2.5 KiB
Diff
|
2006-12-13 Andreas Schwab <schwab@suse.de>
|
||
|
|
||
|
* tests/mv/acl (skip): Check for acl support in the file system.
|
||
|
|
||
|
* tests/mv/Makefile.am (XFAIL_TESTS): Remove.
|
||
|
(TESTS_ENVIRONMENT): Pass CONFIG_HEADER.
|
||
|
|
||
|
2006-12-12 Jim Meyering <jim@meyering.net>
|
||
|
|
||
|
* m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
|
||
|
Reported by Andreas Schwab <schwab@suse.de>.
|
||
|
|
||
|
diff --git a/tests/mv/Makefile.am b/tests/mv/Makefile.am
|
||
|
index 57581cd..0a1f2db 100644
|
||
|
--- a/tests/mv/Makefile.am
|
||
|
+++ b/tests/mv/Makefile.am
|
||
|
@@ -20,7 +20,6 @@
|
||
|
|
||
|
AUTOMAKE_OPTIONS = 1.3 gnits
|
||
|
|
||
|
-XFAIL_TESTS = acl
|
||
|
TESTS = \
|
||
|
hard-verbose \
|
||
|
backup-dir \
|
||
|
@@ -48,4 +47,5 @@ TESTS_ENVIRONMENT = \
|
||
|
PERL="$(PERL)" \
|
||
|
EGREP="$(EGREP)" \
|
||
|
PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" \
|
||
|
+ CONFIG_HEADER=$(CONFIG_HEADER) \
|
||
|
PROG=mv
|
||
|
diff --git a/tests/mv/acl b/tests/mv/acl
|
||
|
index f570656..df3bb01 100755
|
||
|
--- a/tests/mv/acl
|
||
|
+++ b/tests/mv/acl
|
||
|
@@ -24,6 +24,13 @@
|
||
|
# Make sure we get English translations.
|
||
|
. $srcdir/../lang-default
|
||
|
|
||
|
+# Skip this test if cp was built without ACL support:
|
||
|
+grep '^#define USE_ACL 0' $CONFIG_HEADER > /dev/null && \
|
||
|
+ {
|
||
|
+ echo 1>&2 "$0: insufficient ACL support, so skipping this test"
|
||
|
+ (exit 77); exit 77
|
||
|
+ }
|
||
|
+
|
||
|
if test "$VERBOSE" = yes; then
|
||
|
set -x
|
||
|
mv --version
|
||
|
@@ -46,15 +53,26 @@ framework_failure=0
|
||
|
mkdir -p $tmp || framework_failure=1
|
||
|
cd $tmp || framework_failure=1
|
||
|
|
||
|
+touch file || framework_failure=1
|
||
|
+
|
||
|
if test $framework_failure = 1; then
|
||
|
echo 'failure in testing framework'
|
||
|
(exit 1); exit 1
|
||
|
fi
|
||
|
|
||
|
+skip=no
|
||
|
+# Ensure that setfacl and getfacl work on this file system.
|
||
|
+setfacl -m user:bin:rw file 2> /dev/null || skip=yes
|
||
|
+acl1=`getfacl file` || skip=yes
|
||
|
+
|
||
|
+test $skip = yes &&
|
||
|
+ {
|
||
|
+ echo "$0: '.' is not on a suitable file system for this test" 1>&2
|
||
|
+ echo "$0: skipping this test" 1>&2
|
||
|
+ (exit 77); exit 77
|
||
|
+ }
|
||
|
+
|
||
|
# move the access acl of a file
|
||
|
-touch file || framework_failure=1
|
||
|
-setfacl -m user:bin:rw file || framework_failure=1
|
||
|
-acl1=`getfacl file` || framework_failure=1
|
||
|
mv file $other_partition_tmpdir || fail=1
|
||
|
acl2=`cd $other_partition_tmpdir && getfacl file` || framework_failure=1
|
||
|
test "$acl1" = "$acl2" || fail=1
|
||
|
--- a/m4/acl.m4
|
||
|
+++ b/m4/acl.m4
|
||
|
@@ -53,7 +53,7 @@
|
||
|
#include <errno.h>
|
||
|
]],
|
||
|
[[return !! (!acl_get_file (".", ACL_TYPE_ACCESS)
|
||
|
- || errno == ENOENT);]])],
|
||
|
+ && errno == ENOENT);]])],
|
||
|
[gl_cv_func_working_acl_get_file=yes],
|
||
|
[gl_cv_func_working_acl_get_file=no],
|
||
|
[gl_cv_func_working_acl_get_file=cross-compiling])])
|