ZTS: Fix reservation_001_pos

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
This commit is contained in:
Brian Behlendorf 2018-08-17 10:01:47 -07:00 committed by GitHub
parent 4338c5c06f
commit 802715b74a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ verify_runnable "both"
function cleanup function cleanup
{ {
for obj in $OBJ_LIST; do for obj in $OBJ_LIST; do
datasetexists $obj && log_must zfs destroy -f $obj destroy_dataset $obj
done done
} }