mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +03:00
tests: prune cat (ab)uses
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13259
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
. $STF_SUITE/include/libtest.shlib
|
||||
. $STF_SUITE/tests/functional/xattr/xattr_common.kshlib
|
||||
|
||||
USES_NIS=$(cat $TEST_BASE_DIR/zfs-xattr-test-nis.txt)
|
||||
USES_NIS=$(<$TEST_BASE_DIR/zfs-xattr-test-nis.txt)
|
||||
rm $TEST_BASE_DIR/zfs-xattr-test-nis.txt
|
||||
|
||||
if [ "${USES_NIS}" == "true" ]
|
||||
|
||||
@@ -97,10 +97,10 @@ function delete_xattr { # filename xattr_name
|
||||
if is_illumos; then
|
||||
log_must runat $FILE rm $XATTR_NAME
|
||||
log_mustnot eval "runat $FILE ls $XATTR_NAME > /dev/null 2>&1"
|
||||
else
|
||||
log_must rm_xattr $XATTR_NAME $FILE
|
||||
log_mustnot get_xattr $XATTR_NAME $FILE
|
||||
fi
|
||||
else
|
||||
log_must rm_xattr $XATTR_NAME $FILE
|
||||
log_mustnot get_xattr $XATTR_NAME $FILE
|
||||
fi
|
||||
}
|
||||
|
||||
# not sure about this : really this should be testing write/append
|
||||
@@ -126,12 +126,6 @@ function verify_write_xattr { # filename xattr_name
|
||||
function create_expected_output { # expected_output_file contents_of_the_output
|
||||
typeset FILE=$1
|
||||
shift
|
||||
if [[ -f $FILE ]]; then
|
||||
log_must rm $FILE
|
||||
fi
|
||||
|
||||
for line in $@
|
||||
do
|
||||
log_must eval "echo $line >> $FILE"
|
||||
done
|
||||
log_must rm -f $FILE
|
||||
log_must eval "printf '%s\n' $* >> $FILE"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user