From ea8c83fdda344943bf80533f18d30bc95d414612 Mon Sep 17 00:00:00 2001 From: Yuri Pankov Date: Wed, 24 May 2017 06:46:28 -0400 Subject: [PATCH] OpenZFS 8071 - zfs-tests: 7290 missed some cases Authored by: Yuri Pankov Reviewed by: Matthew Ahrens Reviewed by: John Kennedy Approved by: Richard Lowe Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Ported-by: bunder2015 OpenZFS-issue: https://www.illumos.org/issues/8071 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/e84991e Closes #6161 --- .../zpool_destroy/zpool_destroy_002_pos.ksh | 4 +--- .../tests/functional/xattr/xattr_009_neg.ksh | 4 ++-- .../zvol/zvol_misc/zvol_misc_002_pos.ksh | 15 +++++++-------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_002_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_002_pos.ksh index 863e7d368e..ad9425795c 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_002_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_002_pos.ksh @@ -52,9 +52,7 @@ function cleanup [[ -n $cwd ]] && log_must cd $cwd if [[ -d $TESTDIR ]]; then - ismounted $TESTDIR - (( $? == 0 )) && \ - log_must $UNMOUNT $TESTDIR + ismounted $TESTDIR && log_must umount $TESTDIR log_must rm -rf $TESTDIR fi diff --git a/tests/zfs-tests/tests/functional/xattr/xattr_009_neg.ksh b/tests/zfs-tests/tests/functional/xattr/xattr_009_neg.ksh index ea5b40eec9..f64f7e42b4 100755 --- a/tests/zfs-tests/tests/functional/xattr/xattr_009_neg.ksh +++ b/tests/zfs-tests/tests/functional/xattr/xattr_009_neg.ksh @@ -58,9 +58,9 @@ log_must touch $TESTDIR/myfile.$$ create_xattr $TESTDIR/myfile.$$ passwd /etc/passwd # Try to create a soft link from the xattr namespace to the default namespace -log_mustnot runat $TESTDIR/myfile.$$ $LN -s /etc/passwd foo +log_mustnot runat $TESTDIR/myfile.$$ ln -s /etc/passwd foo # Try to create a hard link from the xattr namespace to the default namespace -log_mustnot runat $TESTDIR/myfile.$$ $LN /etc/passwd foo +log_mustnot runat $TESTDIR/myfile.$$ ln /etc/passwd foo log_pass "links between xattr and normal file namespace fail" diff --git a/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_002_pos.ksh b/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_002_pos.ksh index c749756fd5..00a7ac1663 100755 --- a/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_002_pos.ksh +++ b/tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_002_pos.ksh @@ -77,14 +77,13 @@ typeset -i fn=0 typeset -i retval=0 while (( 1 )); do - file_write -o create -f $TESTDIR/testfile$$.$fn \ - -b $BLOCKSZ -c $NUM_WRITES - retval=$? - if (( $retval != 0 )); then - break - fi - - (( fn = fn + 1 )) + file_write -o create -f $TESTDIR/testfile$$.$fn \ + -b $BLOCKSZ -c $NUM_WRITES + retval=$? + if (( $retval != 0 )); then + break + fi + (( fn = fn + 1 )) done if is_linux; then