ztest: use $ZDB instead of $ZDB_PATH for zdb

Which actually gets zdb as set in common.sh

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13316
This commit is contained in:
наб 2022-05-03 12:15:46 +02:00 committed by Brian Behlendorf
parent 1a58941275
commit c6a5d7d997
1 changed files with 4 additions and 4 deletions

View File

@ -6626,14 +6626,14 @@ ztest_get_zdb_bin(char *bin, int len)
{
char *zdb_path;
/*
* Try to use ZDB_PATH and in-tree zdb path. If not successful, just
* Try to use $ZDB and in-tree zdb path. If not successful, just
* let popen to search through PATH.
*/
if ((zdb_path = getenv("ZDB_PATH"))) {
if ((zdb_path = getenv("ZDB"))) {
strlcpy(bin, zdb_path, len); /* In env */
if (!ztest_check_path(bin)) {
ztest_dump_core = 0;
fatal(B_TRUE, "invalid ZDB_PATH '%s'", bin);
fatal(B_TRUE, "invalid ZDB '%s'", bin);
}
return;
}
@ -6858,7 +6858,7 @@ ztest_run_zdb(char *pool)
free(set_gvars_args_joined);
if (ztest_opts.zo_verbose >= 5)
(void) printf("Executing %s\n", strstr(zdb, "zdb "));
(void) printf("Executing %s\n", zdb);
fp = popen(zdb, "r");