]> git.proxmox.com Git - mirror_zfs.git/blobdiff - tests/zfs-tests/tests/functional/removal/removal_with_export.ksh
OpenZFS 9166 - zfs storage pool checkpoint
[mirror_zfs.git] / tests / zfs-tests / tests / functional / removal / removal_with_export.ksh
index 38d6d53d4e459a43f4aed7ae071d40838e6fbc42..0ec358aadba939c6ade5fb4b6345664ab3d9c7f7 100755 (executable)
@@ -15,7 +15,7 @@
 #
 
 #
-# Copyright (c) 2014, 2016 by Delphix. All rights reserved.
+# Copyright (c) 2014, 2017 by Delphix. All rights reserved.
 #
 
 . $STF_SUITE/include/libtest.shlib
 default_setup_noexit "$DISKS"
 log_onexit default_cleanup_noexit
 
-function callback # count
+function callback
 {
-       typeset count=$1
-       if ((count == 0)); then
-               is_linux && test_removal_with_operation_kill
-               log_must zpool export $TESTPOOL
-
-               #
-               # We are concurrently starting dd processes that will
-               # create files in $TESTDIR.  These could cause the import
-               # to fail because it can't mount on the filesystem on a
-               # non-empty directory.  Therefore, remove the directory
-               # so that the dd process will fail.
-               #
-               log_must rm -rf $TESTDIR
-
-               log_must zpool import $TESTPOOL
-       fi
+       is_linux && test_removal_with_operation_kill
+       log_must zpool export $TESTPOOL
+
+       #
+       # We are concurrently starting dd processes that will
+       # create files in $TESTDIR.  These could cause the import
+       # to fail because it can't mount on the filesystem on a
+       # non-empty directory.  Therefore, remove the directory
+       # so that the dd process will fail.
+       #
+       log_must rm -rf $TESTDIR
+
+       log_must zpool import $TESTPOOL
        return 0
 }