Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH bluez] tools/test-runner: Fix TESTHOME parsing for short paths
@ 2026-11-19 12:09 Zijun Hu
  2026-11-19 18:31 ` [bluez] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Zijun Hu @ 2026-11-19 12:09 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, Linux Bluetooth; +Cc: Zijun Hu

TESTHOME is parsed wrongly if the HOME path is shorter than 4
characters, e.g. "TESTHOME=/ab TESTDBUS=1" gives "/ab TESTDBUS=1".

Fix by searching from @ptr + 9, the HOME path start, instead of
@home + 9.

Fixes: e622e623de13 ("build: Add test-runner utility for virtual machine execution")
Assisted-by: Claude:claude-opus-5-5
---
 tools/test-runner.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/test-runner.c b/tools/test-runner.c
index 0bca31a46351..6b8d0522fa7a 100644
--- a/tools/test-runner.c
+++ b/tools/test-runner.c
@@ -2167,17 +2167,17 @@ static void run_tests(void)
 			audio_server = strndup(start, end - start);
 			printf("Audio server %s requested\n", audio_server);
 		}
 	}
 
 	ptr = strstr(cmdline, "TESTHOME=");
 	if (ptr) {
 		home = ptr + 4;
-		ptr = strpbrk(home + 9, " \r\n");
+		ptr = strpbrk(ptr + 9, " \r\n");
 		if (ptr)
 			*ptr = '\0';
 	}
 
 	run_command(cmds, home);
 }
 
 static void usage(void)

---
base-commit: 1adfe662efeff12997df9ddd0960dbd0de9c8ea7
change-id: 20261119-fix_test_runner-5773413a0ef9

Best regards,
--  
Zijun Hu <zijun.hu@oss.qualcomm.com>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-19 18:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 12:09 [PATCH bluez] tools/test-runner: Fix TESTHOME parsing for short paths Zijun Hu
2026-11-19 18:31 ` [bluez] " bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox