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:
parent
112c1bff94
commit
ef3331e703
|
@ -62,7 +62,8 @@ function cleanup
|
||||||
# pool, otherwise next test will fail trying to set a
|
# pool, otherwise next test will fail trying to set a
|
||||||
# quota which is less than the space used.
|
# quota which is less than the space used.
|
||||||
#
|
#
|
||||||
sleep 5
|
wait_freeing $TESTPOOL
|
||||||
|
sync_pool $TESTPOOL
|
||||||
}
|
}
|
||||||
|
|
||||||
log_onexit cleanup
|
log_onexit cleanup
|
||||||
|
|
|
@ -61,6 +61,9 @@ function cleanup
|
||||||
|
|
||||||
[[ -e $TESTDIR/$TESTFILE2 ]] && \
|
[[ -e $TESTDIR/$TESTFILE2 ]] && \
|
||||||
log_must rm $TESTDIR/$TESTFILE2
|
log_must rm $TESTDIR/$TESTFILE2
|
||||||
|
|
||||||
|
wait_freeing $TESTPOOL
|
||||||
|
sync_pool $TESTPOOL
|
||||||
}
|
}
|
||||||
|
|
||||||
log_onexit cleanup
|
log_onexit cleanup
|
||||||
|
|
|
@ -61,11 +61,12 @@ function cleanup
|
||||||
log_must rm $TESTDIR1/$TESTFILE1
|
log_must rm $TESTDIR1/$TESTFILE1
|
||||||
|
|
||||||
#
|
#
|
||||||
# Need to allow time for space to be released back to
|
# Need to allow time for space to be released back to
|
||||||
# pool, otherwise next test will fail trying to set a
|
# pool, otherwise next test will fail trying to set a
|
||||||
# quota which is less than the space used.
|
# quota which is less than the space used.
|
||||||
#
|
#
|
||||||
sleep 5
|
wait_freeing $TESTPOOL
|
||||||
|
sync_pool $TESTPOOL
|
||||||
}
|
}
|
||||||
|
|
||||||
log_onexit cleanup
|
log_onexit cleanup
|
||||||
|
|
|
@ -62,6 +62,9 @@ function cleanup
|
||||||
|
|
||||||
[[ -e $TESTDIR1/$TESTFILE2 ]] && \
|
[[ -e $TESTDIR1/$TESTFILE2 ]] && \
|
||||||
log_must rm $TESTDIR1/$TESTFILE2
|
log_must rm $TESTDIR1/$TESTFILE2
|
||||||
|
|
||||||
|
wait_freeing $TESTPOOL
|
||||||
|
sync_pool $TESTPOOL
|
||||||
}
|
}
|
||||||
|
|
||||||
log_onexit cleanup
|
log_onexit cleanup
|
||||||
|
|
|
@ -34,7 +34,7 @@ function wait_for_removal # pool
|
||||||
# The pool state changes before the TXG finishes syncing; wait for
|
# The pool state changes before the TXG finishes syncing; wait for
|
||||||
# the removal to be completed on disk.
|
# the removal to be completed on disk.
|
||||||
#
|
#
|
||||||
sync_pool
|
sync_pool $pool
|
||||||
|
|
||||||
log_must is_pool_removed $pool
|
log_must is_pool_removed $pool
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in New Issue