diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/zfs-tests/tests/functional/xattr/xattr_004_pos.ksh | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/tests/zfs-tests/tests/functional/xattr/xattr_004_pos.ksh b/tests/zfs-tests/tests/functional/xattr/xattr_004_pos.ksh index 0a25d7ac5..786322b30 100755 --- a/tests/zfs-tests/tests/functional/xattr/xattr_004_pos.ksh +++ b/tests/zfs-tests/tests/functional/xattr/xattr_004_pos.ksh @@ -33,11 +33,11 @@ # # DESCRIPTION: # -# Creating files on ufs|ext and tmpfs, and copying those files to ZFS with -# appropriate cp flags, the xattrs will still be readable. +# Create files on ufs|ext, copy those files to ZFS with appropriate cp flags, +# and verify the xattrs will still be readable. # # STRATEGY: -# 1. Create files in ufs|ext and tmpfs with xattrs +# 1. Create files in ufs|ext with xattrs # 2. Copy those files to zfs # 3. Ensure the xattrs can be read and written # 4. Do the same in reverse. @@ -54,7 +54,7 @@ function cleanup { fi } -log_assert "Files from $NEWFS_DEFAULT_FS,tmpfs with xattrs copied to zfs retain xattr info." +log_assert "Files from $NEWFS_DEFAULT_FS with xattrs copied to zfs retain xattr info." log_onexit cleanup # Create a ufs|ext file system that we can work in @@ -63,28 +63,23 @@ block_device_wait log_must eval "new_fs $ZVOL_DEVDIR/$TESTPOOL/$TESTFS/zvol > /dev/null 2>&1" log_must mkdir /tmp/$NEWFS_DEFAULT_FS.$$ -log_must mkdir /tmp/tmpfs.$$ if is_illumos; then log_must mount $ZVOL_DEVDIR/$TESTPOOL/$TESTFS/zvol \ /tmp/$NEWFS_DEFAULT_FS.$$ - # Create files in ufs and tmpfs, and set some xattrs on them. + # Create files in ufs, and set some xattrs on them. log_must touch /tmp/$NEWFS_DEFAULT_FS.$$/$NEWFS_DEFAULT_FS-file.$$ - log_must touch /tmp/tmpfs-file.$$ log_must runat /tmp/$NEWFS_DEFAULT_FS.$$/$NEWFS_DEFAULT_FS-file.$$ \ cp /etc/passwd . - log_must runat /tmp/tmpfs-file.$$ cp /etc/group . # copy those files to ZFS log_must cp -@ /tmp/$NEWFS_DEFAULT_FS.$$/$NEWFS_DEFAULT_FS-file.$$ \ $TESTDIR - log_must cp -@ /tmp/tmpfs-file.$$ $TESTDIR # ensure the xattr information has been copied correctly log_must runat $TESTDIR/$NEWFS_DEFAULT_FS-file.$$ \ diff passwd /etc/passwd - log_must runat $TESTDIR/tmpfs-file.$$ diff group /etc/group log_must umount /tmp/$NEWFS_DEFAULT_FS.$$ else @@ -94,21 +89,15 @@ else log_must mount ${options:+""} \ $ZVOL_DEVDIR/$TESTPOOL/$TESTFS/zvol /tmp/$NEWFS_DEFAULT_FS.$$ - # Create files in ext and tmpfs, and set some xattrs on them. + # Create files in ext, and set some xattrs on them. # Use small values for xattrs for ext compatibility. log_must touch /tmp/$NEWFS_DEFAULT_FS.$$/$NEWFS_DEFAULT_FS-file.$$ echo "TEST XATTR" >/tmp/xattr1 - echo "1234567890" >/tmp/xattr2 log_must set_xattr_stdin xattr1 \ /tmp/$NEWFS_DEFAULT_FS.$$/$NEWFS_DEFAULT_FS-file.$$ </tmp/xattr1 - if is_linux; then - log_must touch /tmp/tmpfs-file.$$ - log_must set_xattr_stdin xattr2 /tmp/tmpfs-file.$$ </tmp/xattr2 - fi - # copy those files to ZFS if is_freebsd; then # cp does not preserve extattrs on FreeBSD @@ -119,7 +108,6 @@ else log_must cp -a \ /tmp/$NEWFS_DEFAULT_FS.$$/$NEWFS_DEFAULT_FS-file.$$ \ $TESTDIR - log_must cp -a /tmp/tmpfs-file.$$ $TESTDIR fi # ensure the xattr information has been copied correctly @@ -129,15 +117,7 @@ else log_must rm $TESTDIR/$NEWFS_DEFAULT_FS-file.$$ log_must rm /tmp/xattr1 /tmp/xattr1.$$ - if is_linux; then - log_must eval "get_xattr xattr2 $TESTDIR/tmpfs-file.$$ \ - >/tmp/xattr2.$$" - log_must diff /tmp/xattr2.$$ /tmp/xattr2 - log_must rm /tmp/tmpfs-file.$$ - log_must rm /tmp/xattr2 /tmp/xattr2.$$ - fi - log_must umount /tmp/$NEWFS_DEFAULT_FS.$$ fi -log_pass "Files from $NEWFS_DEFAULT_FS,tmpfs with xattrs copied to zfs retain xattr info." +log_pass "Files from $NEWFS_DEFAULT_FS with xattrs copied to zfs retain xattr info." |