aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ztest
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2020-05-29 21:14:10 -0700
committerGitHub <[email protected]>2020-05-29 21:14:10 -0700
commit3d93161b0112b0baa4f5483d03105bd77605ff8d (patch)
tree379c1caf3d1abd9cbfbfccfee6f8f4e80d72280c /cmd/ztest
parent4d829ad9c128d7769a1552d3170d2a66b8c6c7d4 (diff)
ztest: Fix ztest_run_zdb() failure
It's possible for ztest to be killed while the pool is exported which results in an empty cache file. This is a valid state to test, but the validation check performed by ztest_run_zdb() depends on the pool being in the cache file. If it's not the following error is printed. zdb -bccsv -G -d -Y -U /tmp/zloop-run/zpool.cache ztest zdb: can't open '/tmp/zloop-run': No such file or directory Resolve these failures by removing the dependency on the cache file. Functionally, we only care that the pool can be imported and that the zdb verification passes. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #10385
Diffstat (limited to 'cmd/ztest')
-rw-r--r--cmd/ztest/ztest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index 92b46c296..ca49d99fd 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -6457,11 +6457,11 @@ ztest_run_zdb(char *pool)
ztest_get_zdb_bin(bin, len);
(void) sprintf(zdb,
- "%s -bcc%s%s -G -d -Y -U %s %s",
+ "%s -bcc%s%s -G -d -Y -e -p %s %s",
bin,
ztest_opts.zo_verbose >= 3 ? "s" : "",
ztest_opts.zo_verbose >= 4 ? "v" : "",
- spa_config_path,
+ ztest_opts.zo_dir,
pool);
if (ztest_opts.zo_verbose >= 5)