* [PATCH BlueZ] test-runner: Allow to use host CPU on demand
@ 2025-02-14 6:45 Arkadiusz Bokowy
2025-02-14 8:07 ` [BlueZ] " bluez.test.bot
2025-02-14 16:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Arkadiusz Bokowy @ 2025-02-14 6:45 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Arkadiusz Bokowy
The "-cpu host" option for QEMU can not be enabled by default because
our CI system does not have a support for KVM. In order to allow to run
the test-runner on systems where binaries built on the host are not
compatible with QEMU CPU variant, the "--qemu-host-cpu" option will add
the "-cpu host" to the QEMU command line arguments.
---
tools/test-runner.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/tools/test-runner.c b/tools/test-runner.c
index 48e114174..1d770330c 100644
--- a/tools/test-runner.c
+++ b/tools/test-runner.c
@@ -52,6 +52,7 @@ static bool start_dbus_session;
static bool start_daemon = false;
static bool start_emulator = false;
static bool start_monitor = false;
+static bool qemu_host_cpu = false;
static int num_devs = 0;
static const char *qemu_binary = NULL;
static const char *kernel_image = NULL;
@@ -211,7 +212,6 @@ static char *const qemu_argv[] = {
"-monitor", "none",
"-display", "none",
"-machine", "type=q35,accel=kvm:tcg",
- "-cpu", "host",
"-m", "256M",
"-net", "none",
"-no-reboot",
@@ -280,7 +280,7 @@ static void start_qemu(void)
testargs);
argv = alloca(sizeof(qemu_argv) +
- (sizeof(char *) * (4 + (num_devs * 4))));
+ (sizeof(char *) * (6 + (num_devs * 4))));
memcpy(argv, qemu_argv, sizeof(qemu_argv));
pos = (sizeof(qemu_argv) / sizeof(char *)) - 1;
@@ -292,6 +292,11 @@ static void start_qemu(void)
}
argv[0] = (char *) qemu_binary;
+ if (qemu_host_cpu) {
+ argv[pos++] = "-cpu";
+ argv[pos++] = "host";
+ }
+
argv[pos++] = "-kernel";
argv[pos++] = (char *) kernel_image;
argv[pos++] = "-append";
@@ -1171,6 +1176,7 @@ static void usage(void)
"\t-A, --audio[=path] Start audio server\n"
"\t-u, --unix [path] Provide serial device\n"
"\t-q, --qemu <path> QEMU binary\n"
+ "\t-H, --qemu-host-cpu Use host CPU (requires KVM support)\n"
"\t-k, --kernel <image> Kernel image (bzImage)\n"
"\t-h, --help Show help options\n");
}
@@ -1185,6 +1191,7 @@ static const struct option main_options[] = {
{ "emulator", no_argument, NULL, 'l' },
{ "monitor", no_argument, NULL, 'm' },
{ "qemu", required_argument, NULL, 'q' },
+ { "qemu-host-cpu", no_argument, NULL, 'H' },
{ "kernel", required_argument, NULL, 'k' },
{ "audio", optional_argument, NULL, 'A' },
{ "version", no_argument, NULL, 'v' },
@@ -1206,7 +1213,7 @@ int main(int argc, char *argv[])
for (;;) {
int opt;
- opt = getopt_long(argc, argv, "aubdslmq:k:A::vh", main_options,
+ opt = getopt_long(argc, argv, "aubdslmq:Hk:A::vh", main_options,
NULL);
if (opt < 0)
break;
@@ -1237,6 +1244,9 @@ int main(int argc, char *argv[])
case 'q':
qemu_binary = optarg;
break;
+ case 'H':
+ qemu_host_cpu = true;
+ break;
case 'k':
kernel_image = optarg;
break;
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ] test-runner: Allow to use host CPU on demand
2025-02-14 6:45 [PATCH BlueZ] test-runner: Allow to use host CPU on demand Arkadiusz Bokowy
@ 2025-02-14 8:07 ` bluez.test.bot
2025-02-14 16:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-02-14 8:07 UTC (permalink / raw)
To: linux-bluetooth, arkadiusz.bokowy
[-- Attachment #1: Type: text/plain, Size: 1260 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=933899
---Test result---
Test Summary:
CheckPatch PENDING 0.18 seconds
GitLint PENDING 0.27 seconds
BuildEll PASS 20.38 seconds
BluezMake PASS 1430.06 seconds
MakeCheck PASS 13.97 seconds
MakeDistcheck PASS 157.46 seconds
CheckValgrind PASS 213.31 seconds
CheckSmatch PASS 282.48 seconds
bluezmakeextell PASS 97.54 seconds
IncrementalBuild PENDING 0.28 seconds
ScanBuild PASS 859.92 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] test-runner: Allow to use host CPU on demand
2025-02-14 6:45 [PATCH BlueZ] test-runner: Allow to use host CPU on demand Arkadiusz Bokowy
2025-02-14 8:07 ` [BlueZ] " bluez.test.bot
@ 2025-02-14 16:00 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2025-02-14 16:00 UTC (permalink / raw)
To: arkadiusz.bokowy; +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, 14 Feb 2025 07:45:27 +0100 you wrote:
> The "-cpu host" option for QEMU can not be enabled by default because
> our CI system does not have a support for KVM. In order to allow to run
> the test-runner on systems where binaries built on the host are not
> compatible with QEMU CPU variant, the "--qemu-host-cpu" option will add
> the "-cpu host" to the QEMU command line arguments.
> ---
> tools/test-runner.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
Here is the summary with links:
- [BlueZ] test-runner: Allow to use host CPU on demand
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=af3d67d799aa
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:[~2025-02-14 16:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-14 6:45 [PATCH BlueZ] test-runner: Allow to use host CPU on demand Arkadiusz Bokowy
2025-02-14 8:07 ` [BlueZ] " bluez.test.bot
2025-02-14 16: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.