From e8ca72439327d1f249bef65bc48f9c7520470818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Tue, 3 May 2022 12:22:30 +0200 Subject: [PATCH] ztest: fix in-tree detection for automatic zdb path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #13316 --- cmd/ztest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/ztest.c b/cmd/ztest.c index 65d229f6604f..2dae34e971d7 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; }