diff options
author | Pádraig Brady <P@draigBrady.com> | 2009-08-30 01:27:45 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2009-08-30 10:58:13 +0100 |
commit | 56300b1dc28f4acef88821364419933459d931f6 (patch) | |
tree | 7431d394b59717842cbb8e3617705428849134db /tests/misc/xattr | |
parent | 0a859a6cb0000f3662f1b06c151d80e1d764f983 (diff) | |
download | coreutils-56300b1dc28f4acef88821364419933459d931f6.tar.xz |
tests: don't misbehave if $TMPDIR contains spaces
* tests/misc/xattr: Add quotes.
* tests/mv/acl: Likewise.
* tests/mv/backup-is-src: Likewise.
* tests/mv/hard-link-1: Likewise.
* tests/mv/leak-fd: Likewise.
* tests/mv/mv-special-1: Likewise.
* tests/mv/part-fail: Likewise.
* tests/mv/part-hardlink: Likewise.
* tests/mv/part-rename: Likewise.
* tests/mv/part-symlink: Likewise.
* tests/mv/partition-perm: Likewise.
* tests/mv/sticky-to-xpart: Likewise.
Diffstat (limited to 'tests/misc/xattr')
-rwxr-xr-x | tests/misc/xattr | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/misc/xattr b/tests/misc/xattr index f067ff535..a27e1f6d9 100755 --- a/tests/misc/xattr +++ b/tests/misc/xattr @@ -36,7 +36,7 @@ cp --preserve=xattr -n src dest 2>/dev/null \ cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" b_other="$other_partition_tmpdir/b" -rm -f $b_other || framework_failure +rm -f "$b_other" || framework_failure # testing xattr name-value pair xattr_name="user.foo" @@ -98,17 +98,18 @@ EOF # try to set user xattr on file on other partition test_mv=1 -touch $b_other || framework_failure -setfattr -n "$xattr_name" -v "$xattr_value" $b_other >out_a 2>/dev/null \ +touch "$b_other" || framework_failure +setfattr -n "$xattr_name" -v "$xattr_value" "$b_other" >out_a 2>/dev/null \ || test_mv=0 -getfattr -d $b_other >out_b 2>/dev/null || test_mv=0 +getfattr -d "$b_other" >out_b 2>/dev/null || test_mv=0 grep -F "$xattr_pair" out_b >/dev/null || test_mv=0 -rm -f $b_other || framework_failure +rm -f "$b_other" || framework_failure if test $test_mv -eq 1; then # mv should preserve xattr when copying content from one partition to another - mv b $b_other || fail=1 - getfattr -d $b_other >out_b 2>/dev/null || skip_test_ "failed to get xattr of file" + mv b "$b_other" || fail=1 + getfattr -d "$b_other" >out_b 2>/dev/null || + skip_test_ "failed to get xattr of file" grep -F "$xattr_pair" out_b >/dev/null || fail=1 else cat >&2 <<EOF |