public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] test-runner: Fix parsing of command line
@ 2022-03-01 23:30 Luiz Augusto von Dentz
  2022-03-02  0:39 ` [BlueZ] " bluez.test.bot
  0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2022-03-01 23:30 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Instead of parsing the command line, which can contain a shell script,
run using /bin/sh so it allows more complex command line to be tested:

sudo tools/test-runner -l -d -k <pathto/bzImage> --
'client/bluetoothctl power on && sleep 2 && client/bluetoothctl power
off'
---
 tools/test-runner.c | 28 +++++++---------------------
 1 file changed, 7 insertions(+), 21 deletions(-)

diff --git a/tools/test-runner.c b/tools/test-runner.c
index e0e002dd6..3dea38bc6 100644
--- a/tools/test-runner.c
+++ b/tools/test-runner.c
@@ -716,25 +716,7 @@ start_next:
 		argv[0] = (char *) test_table[idx];
 		argv[1] = "-q";
 		argv[2] = NULL;
-	} else {
-		while (1) {
-			char *ptr;
-
-			ptr = strchr(cmdname, ' ');
-			if (!ptr) {
-				argv[pos++] = cmdname;
-				break;
-			}
-
-			*ptr = '\0';
-			argv[pos++] = cmdname;
-			if (pos > 8)
-				break;
-
-			cmdname = ptr + 1;
-		}
-
-		argv[pos] = NULL;
+		cmdname = NULL;
 	}
 
 	pos = 0;
@@ -743,7 +725,7 @@ start_next:
 		envp[pos++] = home;
 	envp[pos] = NULL;
 
-	printf("Running command %s\n", argv[0]);
+	printf("Running command %s\n", cmdname ? cmdname : argv[0]);
 
 	pid = fork();
 	if (pid < 0) {
@@ -758,7 +740,11 @@ start_next:
 				perror("Failed to change directory");
 		}
 
-		execve(argv[0], argv, envp);
+		if (!cmdname)
+			execve(argv[0], argv, envp);
+		else
+			execl("/bin/sh", "sh", "-c", cmdname, NULL);
+
 		exit(EXIT_SUCCESS);
 	}
 
-- 
2.35.1


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

* RE: [BlueZ] test-runner: Fix parsing of command line
  2022-03-01 23:30 [PATCH BlueZ] test-runner: Fix parsing of command line Luiz Augusto von Dentz
@ 2022-03-02  0:39 ` bluez.test.bot
  2022-03-02 23:22   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: bluez.test.bot @ 2022-03-02  0:39 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 996 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=619350

---Test result---

Test Summary:
CheckPatch                    PASS      1.54 seconds
GitLint                       PASS      1.02 seconds
Prep - Setup ELL              PASS      48.50 seconds
Build - Prep                  PASS      0.79 seconds
Build - Configure             PASS      9.42 seconds
Build - Make                  PASS      1383.88 seconds
Make Check                    PASS      12.20 seconds
Make Check w/Valgrind         PASS      499.39 seconds
Make Distcheck                PASS      262.03 seconds
Build w/ext ELL - Configure   PASS      10.36 seconds
Build w/ext ELL - Make        PASS      1368.58 seconds
Incremental Build with patchesPASS      0.00 seconds



---
Regards,
Linux Bluetooth


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

* Re: [BlueZ] test-runner: Fix parsing of command line
  2022-03-02  0:39 ` [BlueZ] " bluez.test.bot
@ 2022-03-02 23:22   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2022-03-02 23:22 UTC (permalink / raw)
  To: linux-bluetooth@vger.kernel.org

Hi,

On Tue, Mar 1, 2022 at 4:39 PM <bluez.test.bot@gmail.com> wrote:
>
> This is automated email and please do not reply to this email!
>
> Dear submitter,
>
> Thank you for submitting the patches to the linux bluetooth mailing list.
> This is a CI test results with your patch series:
> PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=619350
>
> ---Test result---
>
> Test Summary:
> CheckPatch                    PASS      1.54 seconds
> GitLint                       PASS      1.02 seconds
> Prep - Setup ELL              PASS      48.50 seconds
> Build - Prep                  PASS      0.79 seconds
> Build - Configure             PASS      9.42 seconds
> Build - Make                  PASS      1383.88 seconds
> Make Check                    PASS      12.20 seconds
> Make Check w/Valgrind         PASS      499.39 seconds
> Make Distcheck                PASS      262.03 seconds
> Build w/ext ELL - Configure   PASS      10.36 seconds
> Build w/ext ELL - Make        PASS      1368.58 seconds
> Incremental Build with patchesPASS      0.00 seconds
>
>
>
> ---
> Regards,
> Linux Bluetooth
>
Pushed.

-- 
Luiz Augusto von Dentz

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

end of thread, other threads:[~2022-03-02 23:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-01 23:30 [PATCH BlueZ] test-runner: Fix parsing of command line Luiz Augusto von Dentz
2022-03-02  0:39 ` [BlueZ] " bluez.test.bot
2022-03-02 23:22   ` Luiz Augusto von Dentz

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