diff options
author | Antonio Russo <[email protected]> | 2021-01-12 18:20:02 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-01-23 15:47:06 -0800 |
commit | 3790aa8176713b98f1b5c8275d537c7eacdc2bcc (patch) | |
tree | fe4677877a307b4668ee6b3a2dd335e89125d0f4 | |
parent | 4e1d1b4b927711db71e93d64f052aba6a0dbe6e4 (diff) |
ZTS: avoid race to unmount in zfs_rollback_001
The zfs_rollback_001 test modifies files in a temporary, test dataset
repeatedly. Before each iteration, any preexisting dataset is removed,
after unmounted with umount -f, if necessary.
Add a short delay after the forced unmount, avoiding a race that can
prevent zfs destroy from succeeding, leading to a test failure.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Antonio Russo <[email protected]>
Closes #11451
-rwxr-xr-x | tests/zfs-tests/tests/functional/cli_root/zfs_rollback/zfs_rollback_001_pos.ksh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_rollback/zfs_rollback_001_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_rollback/zfs_rollback_001_pos.ksh index 5511f6ad6..342c72e16 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_rollback/zfs_rollback_001_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_rollback/zfs_rollback_001_pos.ksh @@ -80,6 +80,7 @@ function test_n_check #opt num_snap_clone num_rollback if datasetexists $VOL; then if ismounted $TESTDIR1 $NEWFS_DEFAULT_FS; then log_must umount -f $TESTDIR1 + sleep 0.1 fi log_must zfs destroy -Rf $VOL |