aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorнаб <[email protected]>2022-05-03 12:22:30 +0200
committerBrian Behlendorf <[email protected]>2022-05-10 10:21:09 -0700
commite8ca72439327d1f249bef65bc48f9c7520470818 (patch)
tree0456cddcd5fa9f1eee03cd7ddf663149ef772a0c
parentc6a5d7d9970a26f10e0404bebeeda5e1acc30b3a (diff)
ztest: fix in-tree detection for automatic zdb path
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13316
-rw-r--r--cmd/ztest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/ztest.c b/cmd/ztest.c
index 65d229f66..2dae34e97 100644
--- a/cmd/ztest.c
+++ b/cmd/ztest.c
@@ -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;
}