Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] test-runner: use virtio for the default kernel console
@ 2026-07-20 14:09 Pauli Virtanen
  2026-07-20 15:11 ` [BlueZ] " bluez.test.bot
  2026-07-20 19:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Pauli Virtanen @ 2026-07-20 14:09 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

Serial as console is slow when commands produce large amounts of output,
e.g. for the -d debug option of the testers.

Use virtio console=hvc0 as the console, requiring
CONFIG_VIRTIO_CONSOLE=y which is already in tester config.

For capturing the early boot messages, retain the qemu serial, kernel
will switch to hvc0 during boot when the HVC driver initializes.

For: time tools/test-runner -k ../../linux -- tools/sco-tester -d
Before: real 0m32,094s, After: real 0m8,967s
---
 tools/test-runner.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/tools/test-runner.c b/tools/test-runner.c
index 0e3bfb8b7..4617afc63 100644
--- a/tools/test-runner.c
+++ b/tools/test-runner.c
@@ -238,6 +238,8 @@ static char *const qemu_argv[] = {
 	"-device", "virtio-9p-pci,fsdev=fsdev-root,mount_tag=/dev/root",
 	"-chardev", "stdio,id=con,mux=on",
 	"-serial", "chardev:con",
+	"-device", "virtio-serial",
+	"-device", "virtconsole,chardev=con,name=console.0",
 	NULL
 };
 
@@ -291,7 +293,7 @@ static void start_qemu(void)
 	}
 
 	snprintf(cmdline, sizeof(cmdline),
-				"console=ttyS0,115200n8 earlyprintk=serial "
+				"console=hvc0 earlyprintk=serial "
 				"no_hash_pointers=1 rootfstype=9p "
 				"rootflags=trans=virtio,version=9p2000.u "
 				"acpi=off pci=noacpi noapic quiet ro init=%s "
@@ -330,11 +332,6 @@ static void start_qemu(void)
 	argv[pos++] = "-append";
 	argv[pos++] = (char *) cmdline;
 
-	if (num_devs) {
-		argv[pos++] = "-device";
-		argv[pos++] = "virtio-serial";
-	}
-
 	for (i = 0; i < num_devs; i++) {
 		char *chrdev, *serdev;
 
@@ -915,7 +912,7 @@ static void run_command(char *cmdname, char *home)
 	}
 
 	if (num_devs) {
-		const char *node = "/dev/hvc0";
+		const char *node = "/dev/hvc1";
 		unsigned int basic_flags, extra_flags;
 
 		printf("Attaching BR/EDR controller to %s\n", node);
-- 
2.55.0


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

end of thread, other threads:[~2026-07-20 19:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20 14:09 [PATCH BlueZ] test-runner: use virtio for the default kernel console Pauli Virtanen
2026-07-20 15:11 ` [BlueZ] " bluez.test.bot
2026-07-20 19:40 ` [PATCH BlueZ] " patchwork-bot+bluetooth

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