ZTS: Wait for free space between quota tests

And in removal tests, sync the specific pool we are waiting on.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10146
This commit is contained in:
Ryan Moeller 2020-03-26 13:48:19 -04:00 committed by GitHub
parent 112c1bff94
commit ef3331e703
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 7 deletions

View File

@ -62,7 +62,8 @@ function cleanup
# pool, otherwise next test will fail trying to set a
# quota which is less than the space used.
#
sleep 5
wait_freeing $TESTPOOL
sync_pool $TESTPOOL
}
log_onexit cleanup

View File

@ -61,6 +61,9 @@ function cleanup
[[ -e $TESTDIR/$TESTFILE2 ]] && \
log_must rm $TESTDIR/$TESTFILE2
wait_freeing $TESTPOOL
sync_pool $TESTPOOL
}
log_onexit cleanup

View File

@ -65,7 +65,8 @@ function cleanup
# pool, otherwise next test will fail trying to set a
# quota which is less than the space used.
#
sleep 5
wait_freeing $TESTPOOL
sync_pool $TESTPOOL
}
log_onexit cleanup

View File

@ -62,6 +62,9 @@ function cleanup
[[ -e $TESTDIR1/$TESTFILE2 ]] && \
log_must rm $TESTDIR1/$TESTFILE2
wait_freeing $TESTPOOL
sync_pool $TESTPOOL
}
log_onexit cleanup

View File

@ -34,7 +34,7 @@ function wait_for_removal # pool
# The pool state changes before the TXG finishes syncing; wait for
# the removal to be completed on disk.
#
sync_pool
sync_pool $pool
log_must is_pool_removed $pool
return 0