diff --git a/tests/zfs-tests/tests/functional/write_dirs/write_dirs_001_pos.ksh b/tests/zfs-tests/tests/functional/write_dirs/write_dirs_001_pos.ksh index 60da382ca..d8c82f722 100755 --- a/tests/zfs-tests/tests/functional/write_dirs/write_dirs_001_pos.ksh +++ b/tests/zfs-tests/tests/functional/write_dirs/write_dirs_001_pos.ksh @@ -47,11 +47,8 @@ verify_runnable "both" function cleanup { - for file in `find $TESTDIR -type f`; do - cat /dev/null > $file - done - log_must sync - log_must rm -rf $TESTDIR/* + destroy_dataset $TESTPOOL/$TESTFS + zfs create -o mountpoint=$TESTDIR $TESTPOOL/$TESTFS } typeset -i retval=0 diff --git a/tests/zfs-tests/tests/functional/write_dirs/write_dirs_002_pos.ksh b/tests/zfs-tests/tests/functional/write_dirs/write_dirs_002_pos.ksh index dcb793e1f..29ef9eadf 100755 --- a/tests/zfs-tests/tests/functional/write_dirs/write_dirs_002_pos.ksh +++ b/tests/zfs-tests/tests/functional/write_dirs/write_dirs_002_pos.ksh @@ -47,11 +47,8 @@ verify_runnable "both" function cleanup { - for file in `find $TESTDIR -type f`; do - cat /dev/null > $file - done - log_must sync - log_must rm -rf $TESTDIR/* + destroy_dataset $TESTPOOL/$TESTFS + zfs create -o mountpoint=$TESTDIR $TESTPOOL/$TESTFS } typeset -i retval=0