ztest: fix in-tree detection for automatic zdb path
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13316
This commit is contained in:
parent
c6a5d7d997
commit
e8ca724393
@ -6639,9 +6639,9 @@ ztest_get_zdb_bin(char *bin, int len)
|
||||
}
|
||||
|
||||
VERIFY3P(realpath(getexecname(), bin), !=, NULL);
|
||||
if (strstr(bin, "/ztest/")) {
|
||||
strstr(bin, "/ztest/")[0] = '\0'; /* In-tree */
|
||||
strcat(bin, "/zdb/zdb");
|
||||
if (strstr(bin, ".libs/ztest")) {
|
||||
strstr(bin, ".libs/ztest")[0] = '\0'; /* In-tree */
|
||||
strcat(bin, "zdb");
|
||||
if (ztest_check_path(bin))
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user