]> granicus.if.org Git - zfs/commitdiff
ZTS: Fix reservation_001_pos
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 17 Aug 2018 17:01:47 +0000 (10:01 -0700)
committerGitHub <noreply@github.com>
Fri, 17 Aug 2018 17:01:47 +0000 (10:01 -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: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7796

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

index d142fe0cc0e71ab0a346889d137a05fb0c6fbf7b..b72b8e4a388e11e9b920961130855d12f5ddc153 100755 (executable)
@@ -54,7 +54,7 @@ verify_runnable "both"
 function cleanup
 {
        for obj in $OBJ_LIST; do
-               datasetexists $obj && log_must zfs destroy -f $obj
+               destroy_dataset $obj
        done
 }