]> granicus.if.org Git - zfs/commitdiff
ZTS: Fix reservation_017_pos
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 30 Jul 2018 16:23:45 +0000 (09:23 -0700)
committerGitHub <noreply@github.com>
Mon, 30 Jul 2018 16:23:45 +0000 (09:23 -0700)
It's possible for an unrelated process, like blkid, to have the
volume open when 'zfs destroy' is run.  Switch the cleanup function
to the destroy_dataset() helper which handles this case by retrying
the destroy when the dataset is busy.

Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7750

tests/zfs-tests/tests/functional/reservation/reservation_017_pos.sh

index dc31c5a8fcda1559987a366e96ee11954e1fb8ba..bb3af67d24d311b385d8e416d6b66a68cec5ff3d 100755 (executable)
@@ -55,7 +55,7 @@ function cleanup
        typeset vol
 
        for vol in $regvol $sparsevol; do
-               datasetexists $vol &&  log_must zfs destroy $vol
+               destroy_dataset $vol
        done
 }
 log_onexit cleanup