All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] test-runner: Add dedicated option to start D-Bus
@ 2022-04-16  0:18 Luiz Augusto von Dentz
  2022-04-16  2:55 ` [BlueZ] " bluez.test.bot
  2022-04-19  0:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2022-04-16  0:18 UTC (permalink / raw)
  To: linux-bluetooth

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

This adds a dedicated option to start D-Bus alone which can be useful
when testing the bluetoothd with the likes of valgrind.
---
 tools/test-runner.c | 38 +++++++++++++++++++++++++++-----------
 1 file changed, 27 insertions(+), 11 deletions(-)

diff --git a/tools/test-runner.c b/tools/test-runner.c
index fd7b3b1b7..1f1a8c36f 100644
--- a/tools/test-runner.c
+++ b/tools/test-runner.c
@@ -47,6 +47,7 @@ static int test_argc;
 
 static bool run_auto = false;
 static bool start_dbus = false;
+static bool start_daemon = false;
 static bool start_emulator = false;
 static bool start_monitor = false;
 static int num_devs = 0;
@@ -249,11 +250,12 @@ static void start_qemu(void)
 				"rootflags=trans=virtio,version=9p2000.L "
 				"acpi=off pci=noacpi noapic quiet ro init=%s "
 				"bluetooth.enable_ecred=1"
-				"TESTHOME=%s TESTDBUS=%u TESTMONITOR=%u "
-				"TESTEMULATOR=%u TESTDEVS=%d TESTAUTO=%u "
-				"TESTARGS=\'%s\'",
-				initcmd, cwd, start_dbus, start_monitor,
-				start_emulator, num_devs, run_auto, testargs);
+				"TESTHOME=%s TESTDBUS=%u TESTDAEMON=%u "
+				"TESTMONITOR=%u TESTEMULATOR=%u TESTDEVS=%d "
+				"TESTAUTO=%u TESTARGS=\'%s\'",
+				initcmd, cwd, start_dbus, start_daemon,
+				start_monitor, start_emulator, num_devs,
+				run_auto, testargs);
 
 	argv = alloca(sizeof(qemu_argv) +
 				(sizeof(char *) * (4 + (num_devs * 4))));
@@ -683,11 +685,13 @@ static void run_command(char *cmdname, char *home)
 	if (start_dbus) {
 		create_dbus_system_conf();
 		dbus_pid = start_dbus_daemon();
-		daemon_pid = start_bluetooth_daemon(home);
-	} else {
+	} else
 		dbus_pid = -1;
+
+	if (start_daemon)
+		daemon_pid = start_bluetooth_daemon(home);
+	else
 		daemon_pid = -1;
-	}
 
 	if (start_monitor)
 		monitor_pid = start_btmon(home);
@@ -874,6 +878,12 @@ static void run_tests(void)
 		start_dbus = true;
 	}
 
+	ptr = strstr(cmdline, "TESTDAEMON=1");
+	if (ptr) {
+		printf("bluetoothd requested\n");
+		start_daemon = true;
+	}
+
 	ptr = strstr(cmdline, "TESTMONITOR=1");
 	if (ptr) {
 		printf("Monitor requested\n");
@@ -904,7 +914,8 @@ static void usage(void)
 	printf("\ttest-runner [options] [--] <command> [args]\n");
 	printf("Options:\n"
 		"\t-a, --auto             Find tests and run them\n"
-		"\t-d, --dbus             Start D-Bus daemon\n"
+		"\t-b, --dbus             Start D-Bus daemon\n"
+		"\t-d, --daemon           Start bluetoothd\n"
 		"\t-m, --monitor          Start btmon\n"
 		"\t-l, --emulator         Start btvirt\n"
 		"\t-u, --unix [path]      Provide serial device\n"
@@ -916,8 +927,9 @@ static void usage(void)
 static const struct option main_options[] = {
 	{ "all",     no_argument,       NULL, 'a' },
 	{ "auto",    no_argument,       NULL, 'a' },
+	{ "dbus",    no_argument,       NULL, 'b' },
 	{ "unix",    no_argument,       NULL, 'u' },
-	{ "dbus",    no_argument,       NULL, 'd' },
+	{ "daemon",  no_argument,       NULL, 'd' },
 	{ "emulator", no_argument,      NULL, 'l' },
 	{ "monitor", no_argument,       NULL, 'm' },
 	{ "qemu",    required_argument, NULL, 'q' },
@@ -941,7 +953,7 @@ int main(int argc, char *argv[])
 	for (;;) {
 		int opt;
 
-		opt = getopt_long(argc, argv, "audlmq:k:vh", main_options,
+		opt = getopt_long(argc, argv, "aubdlmq:k:vh", main_options,
 								NULL);
 		if (opt < 0)
 			break;
@@ -953,8 +965,12 @@ int main(int argc, char *argv[])
 		case 'u':
 			num_devs = 1;
 			break;
+		case 'b':
+			start_dbus = true;
+			break;
 		case 'd':
 			start_dbus = true;
+			start_daemon = true;
 			break;
 		case 'l':
 			start_emulator = true;
-- 
2.35.1


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

* RE: [BlueZ] test-runner: Add dedicated option to start D-Bus
  2022-04-16  0:18 [PATCH BlueZ] test-runner: Add dedicated option to start D-Bus Luiz Augusto von Dentz
@ 2022-04-16  2:55 ` bluez.test.bot
  2022-04-19  0:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2022-04-16  2:55 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 2094 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=632702

---Test result---

Test Summary:
CheckPatch                    FAIL      1.43 seconds
GitLint                       PASS      1.05 seconds
Prep - Setup ELL              PASS      53.24 seconds
Build - Prep                  PASS      0.76 seconds
Build - Configure             PASS      10.54 seconds
Build - Make                  PASS      1475.39 seconds
Make Check                    PASS      12.56 seconds
Make Check w/Valgrind         PASS      542.53 seconds
Make Distcheck                PASS      286.35 seconds
Build w/ext ELL - Configure   PASS      10.83 seconds
Build w/ext ELL - Make        PASS      1446.60 seconds
Incremental Build with patchesPASS      0.00 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script with rule in .checkpatch.conf
Output:
[BlueZ] test-runner: Add dedicated option to start D-Bus
ERROR:INITIALISED_STATIC: do not initialise statics to false
#95: FILE: tools/test-runner.c:50:
+static bool start_daemon = false;

WARNING:MISSING_SPACE: break quoted strings at a space character
#108: FILE: tools/test-runner.c:253:
 				"bluetooth.enable_ecred=1"
+				"TESTHOME=%s TESTDBUS=%u TESTDAEMON=%u "

/github/workspace/src/12815530.patch total: 1 errors, 1 warnings, 91 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/12815530.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.




---
Regards,
Linux Bluetooth


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

* Re: [PATCH BlueZ] test-runner: Add dedicated option to start D-Bus
  2022-04-16  0:18 [PATCH BlueZ] test-runner: Add dedicated option to start D-Bus Luiz Augusto von Dentz
  2022-04-16  2:55 ` [BlueZ] " bluez.test.bot
@ 2022-04-19  0:00 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2022-04-19  0:00 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Fri, 15 Apr 2022 17:18:53 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This adds a dedicated option to start D-Bus alone which can be useful
> when testing the bluetoothd with the likes of valgrind.
> ---
>  tools/test-runner.c | 38 +++++++++++++++++++++++++++-----------
>  1 file changed, 27 insertions(+), 11 deletions(-)

Here is the summary with links:
  - [BlueZ] test-runner: Add dedicated option to start D-Bus
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=fb4997fb09fa

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-04-19  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-16  0:18 [PATCH BlueZ] test-runner: Add dedicated option to start D-Bus Luiz Augusto von Dentz
2022-04-16  2:55 ` [BlueZ] " bluez.test.bot
2022-04-19  0:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.