diff options
author | Serapheim Dimitropoulos <[email protected]> | 2019-01-16 10:41:47 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-01-16 10:41:47 -0800 |
commit | db587941c5ff6dea01932bb78f70db63cf7f38ba (patch) | |
tree | 7877b391f1a5fb944c0791187b08f1c44978a90d /tests/zfs-tests | |
parent | 6e91a72fe3ff8bb282490773bd687632f3e8c79d (diff) |
Make zdb results for checkpoint tests consistent
This patch exports and re-imports the pool when these tests are
analyzed with zdb to get consistent results.
Reviewed by: Igor Kozhukhov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Serapheim Dimitropoulos <[email protected]>
Closes #8292
Diffstat (limited to 'tests/zfs-tests')
-rw-r--r-- | tests/zfs-tests/tests/functional/pool_checkpoint/pool_checkpoint.kshlib | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/zfs-tests/tests/functional/pool_checkpoint/pool_checkpoint.kshlib b/tests/zfs-tests/tests/functional/pool_checkpoint/pool_checkpoint.kshlib index 455a1d12d..6e410e0c8 100644 --- a/tests/zfs-tests/tests/functional/pool_checkpoint/pool_checkpoint.kshlib +++ b/tests/zfs-tests/tests/functional/pool_checkpoint/pool_checkpoint.kshlib @@ -324,8 +324,19 @@ function fragment_after_checkpoint_and_verify # log_must zpool list -v - log_must zdb $NESTEDPOOL - log_must zdb -kc $NESTEDPOOL + # + # Typically we would just run zdb at this point and things + # would be fine. Unfortunately, if there is still any + # background I/O in the pool the zdb command can fail with + # checksum errors temporarily. + # + # Export the pool when running zdb so the pool is idle and + # the verification results are consistent. + # + log_must zpool export $NESTEDPOOL + log_must zdb -e -p $FILEDISKDIR $NESTEDPOOL + log_must zdb -e -p $FILEDISKDIR -kc $NESTEDPOOL + log_must zpool import -d $FILEDISKDIR $NESTEDPOOL } function wait_discard_finish |