ZTS: Fix reservation_017_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: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7750
This commit is contained in:
Brian Behlendorf 2018-07-30 09:23:45 -07:00 committed by GitHub
parent 11d0525cbb
commit b719768e35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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