Linux bluetooth development
 help / color / mirror / Atom feed
From: Zijun Hu <zijun.hu@oss.qualcomm.com>
To: Marcel Holtmann <marcel@holtmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Linux Bluetooth <linux-bluetooth@vger.kernel.org>
Cc: Zijun Hu <zijun_hu@icloud.com>
Subject: [PATCH bluez] tools/test-runner: Fix TESTHOME parsing for short paths
Date: Thu, 19 Nov 2026 04:09:33 -0800	[thread overview]
Message-ID: <20261119-fix_test_runner-v1-1-ddad300e86ed@oss.qualcomm.com> (raw)

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>


             reply	other threads:[~2026-11-19 12:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 12:09 Zijun Hu [this message]
2026-11-19 18:31 ` [bluez] tools/test-runner: Fix TESTHOME parsing for short paths bluez.test.bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261119-fix_test_runner-v1-1-ddad300e86ed@oss.qualcomm.com \
    --to=zijun.hu@oss.qualcomm.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=zijun_hu@icloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox