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 <mail@gmelikov.ru> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #10385
This commit is contained in:
parent
4d829ad9c1
commit
3d93161b01
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue