+++ /dev/null
-From 9c566ad04a3b6b7672ab10cacea23d9f6a599c0e Mon Sep 17 00:00:00 2001
-From: Pádraig Brady <P@draigBrady.com>
-Date: Sat, 23 Jan 2010 23:35:41 +0000
-Subject: tests: make cp-mv-enotsup-xattr independent of the host file system
-
-* tests/cp-mv-enotsup-xattr: Create a file system from which to copy
-the xattrs so that the test is not skipped if the host file system
-does not have user_xattr support. Also don't erroneously fail when
-built without xattr support.
----
-diff --git a/tests/cp/cp-mv-enotsup-xattr b/tests/cp/cp-mv-enotsup-xattr
-index 45f86f7..0239abb 100755
---- a/tests/cp/cp-mv-enotsup-xattr
-+++ b/tests/cp/cp-mv-enotsup-xattr
-@@ -28,65 +28,81 @@ fi
- require_root_
-
- cwd=`pwd`
--cleanup_() { cd /; umount "$cwd/mnt"; }
-+cleanup_() { cd /; umount "$cwd/noxattr"; umount "$cwd/xattr"; }
-
- skip=0
--# Create a file system without user xattr support, then mount it.
--dd if=/dev/zero of=blob bs=8192 count=200 > /dev/null 2>&1 \
-- || skip=1
--mkdir mnt || skip=1
--mkfs -t ext2 -F blob ||
-- skip_test_ "failed to create ext2 file system"
-
--mount -oloop,nouser_xattr blob mnt || skip=1
--echo test > mnt/f || skip=1
--test -s mnt/f || skip=1
-+# Mount an ext2 loopback file system at $WHERE with $OPTS
-+make_fs() {
-+ where="$1"
-+ opts="$2"
-
--test $skip = 1 \
-- && skip_test_ "insufficient mount/ext2 support"
-+ fs="$where.bin"
-+
-+ dd if=/dev/zero of="$fs" bs=8192 count=200 > /dev/null 2>&1 \
-+ || skip=1
-+ mkdir "$where" || skip=1
-+ mkfs -t ext2 -F "$fs" ||
-+ skip_test_ "failed to create ext2 file system"
-+ mount -oloop,$opts "$fs" "$where" || skip=1
-+ echo test > "$where"/f || skip=1
-+ test -s "$where"/f || skip=1
-+
-+ test $skip = 1 &&
-+ skip_test_ "insufficient mount/ext2 support"
-+}
-+
-+make_fs noxattr nouser_xattr
-+make_fs xattr user_xattr
-
- # testing xattr name-value pair
- xattr_name="user.foo"
- xattr_value="bar"
- xattr_pair="$xattr_name=\"$xattr_value\""
-
--echo test > a || framework_failure
--getfattr -d a >out_a || skip_test_ "failed to get xattr of file"
-+echo test > xattr/a || framework_failure
-+getfattr -d xattr/a >out_a || skip_test_ "failed to get xattr of file"
- grep -F "$xattr_pair" out_a >/dev/null && framework_failure
--setfattr -n "$xattr_name" -v "$xattr_value" a >out_a \
-+setfattr -n "$xattr_name" -v "$xattr_value" xattr/a >out_a \
- || skip_test_ "failed to set xattr of file"
--getfattr -d a >out_a || skip_test_ "failed to get xattr of file"
-+getfattr -d xattr/a >out_a || skip_test_ "failed to get xattr of file"
- grep -F "$xattr_pair" out_a >/dev/null \
- || skip_test_ "failed to set xattr of file"
-
-
- # This should pass without diagnostics
--cp -a a mnt/ 2>err || fail=1
--test -s mnt/a || fail=1 # destination file must not be empty
-+cp -a xattr/a noxattr/ 2>err || fail=1
-+test -s noxattr/a || fail=1 # destination file must not be empty
- test -s err && fail=1 # there must be no stderr output
-
--rm -f err mnt/a
-+rm -f err noxattr/a
-
- # This should pass without diagnostics
--cp --preserve=all a mnt/ 2>err || fail=1
--test -s mnt/a || fail=1 # destination file must not be empty
-+cp --preserve=all xattr/a noxattr/ 2>err || fail=1
-+test -s noxattr/a || fail=1 # destination file must not be empty
- test -s err && fail=1 # there must be no stderr output
-
--rm -f err mnt/a
-+rm -f err noxattr/a
-
- # This should fail with coresponding diagnostics
--cp -a --preserve=xattr a mnt/ 2>err && fail=1
--cat <<\EOF > exp || fail=1
--cp: setting attributes for `mnt/a': Operation not supported
-+cp -a --preserve=xattr xattr/a noxattr/ 2>err && fail=1
-+if grep '^#define USE_XATTR 1' $CONFIG_HEADER > /dev/null; then
-+cat <<\EOF > exp
-+cp: setting attributes for `noxattr/a': Operation not supported
- EOF
-+else
-+cat <<\EOF > exp
-+cp: cannot preserve extended attributes, cp is built without xattr support
-+EOF
-+fi
-
- compare err exp || fail=1
-
--rm -f err mnt/a
-+rm -f err noxattr/a
-
- # This should pass without diagnostics
--mv a mnt/ 2>err || fail=1
--test -s mnt/a || fail=1 # destination file must not be empty
--test -s err && fail=1 # there must be no stderr output
-+mv xattr/a noxattr/ 2>err || fail=1
-+test -s noxattr/a || fail=1 # destination file must not be empty
-+test -s err && fail=1 # there must be no stderr output
-
- Exit $fail
---
-cgit v0.8.2.1
+++ /dev/null
-From e489fd04d66000829f5458843970794eccacced8 Mon Sep 17 00:00:00 2001
-From: Eric Blake <ebb9@byu.net>
-Date: Sat, 16 Jan 2010 13:46:17 +0000
-Subject: build: fix failure from bogus USE_XATTR definition
-
-* m4/xattr.m4 (gl_FUNC_ADDR): Fix regression introduced in commit
-6beca4248.
-* THANKS: Update.
-Reported by Adam Sampson.
----
-diff --git a/THANKS b/THANKS
-index 583ea60..1207368 100644
---- a/THANKS
-+++ b/THANKS
-@@ -12,6 +12,7 @@ Aaron Hawley ashawley@uvm.edu
- Achim Blumensath blume@corona.oche.de
- Adam Jimerson vendion@charter.net
- Adam Klein aklein@debian.org
-+Adam Sampson ats@offog.org
- Adrian Bunk bunk@stusta.de
- AIDA Shinra shinra@j10n.org
- Akim Demaille demaille@inf.enst.fr
-diff --git a/m4/xattr.m4 b/m4/xattr.m4
-index bf7e872..80fddbd 100644
---- a/m4/xattr.m4
-+++ b/m4/xattr.m4
-@@ -1,4 +1,5 @@
- # xattr.m4 - check for Extended Attributes (Linux)
-+# serial 3
-
- # Copyright (C) 2003, 2008-2010 Free Software Foundation, Inc.
- # This file is free software; the Free Software Foundation
-@@ -33,11 +34,11 @@ AC_DEFUN([gl_FUNC_XATTR],
- use_xattr=yes
- fi
- fi
-- AC_DEFINE_UNQUOTED([USE_XATTR], [$use_xattr],
-- [Define if you want extended attribute support.])
- if test $use_xattr = no; then
- AC_MSG_WARN([libattr development library was not found or not usable.])
- AC_MSG_WARN([AC_PACKAGE_NAME will be built without xattr support.])
- fi
- fi
-+ AC_DEFINE_UNQUOTED([USE_XATTR], [`test $use_xattr != yes; echo $?`],
-+ [Define if you want extended attribute support.])
- ])
---
-cgit v0.8.2.1