From: Fabiano Rosas <farosas@suse.de>
To: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Thomas Huth" <thuth@redhat.com>, "John Snow" <jsnow@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>
Subject: [PATCH v3 3/3] tests/qtest: Don't run cdrom boot tests if no accelerator is present
Date: Mon, 8 May 2023 15:16:11 -0300 [thread overview]
Message-ID: <20230508181611.2621-4-farosas@suse.de> (raw)
In-Reply-To: <20230508181611.2621-1-farosas@suse.de>
On a build configured with: --disable-tcg --enable-xen it is possible
to produce a QEMU binary with no TCG nor KVM support. Skip the cdrom
boot tests if that's the case.
Fixes: 0c1ae3ff9d ("tests/qtest: Fix tests when no KVM or TCG are present")
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
tests/qtest/cdrom-test.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c
index 26a2400181..31d3bacd8c 100644
--- a/tests/qtest/cdrom-test.c
+++ b/tests/qtest/cdrom-test.c
@@ -130,6 +130,11 @@ static void test_cdboot(gconstpointer data)
static void add_x86_tests(void)
{
+ if (!qtest_has_accel("tcg") && !qtest_has_accel("kvm")) {
+ g_test_skip("No KVM or TCG accelerator available, skipping boot tests");
+ return;
+ }
+
qtest_add_data_func("cdrom/boot/default", "-cdrom ", test_cdboot);
qtest_add_data_func("cdrom/boot/virtio-scsi",
"-device virtio-scsi -device scsi-cd,drive=cdr "
@@ -176,6 +181,11 @@ static void add_x86_tests(void)
static void add_s390x_tests(void)
{
+ if (!qtest_has_accel("tcg") && !qtest_has_accel("kvm")) {
+ g_test_skip("No KVM or TCG accelerator available, skipping boot tests");
+ return;
+ }
+
qtest_add_data_func("cdrom/boot/default", "-cdrom ", test_cdboot);
qtest_add_data_func("cdrom/boot/virtio-scsi",
"-device virtio-scsi -device scsi-cd,drive=cdr "
--
2.35.3
next prev parent reply other threads:[~2023-05-08 18:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-08 18:16 [PATCH v3 0/3] target/arm: disable-tcg and without-default-devices fixes Fabiano Rosas
2023-05-08 18:16 ` [PATCH v3 1/3] target/arm: Select SEMIHOSTING when using TCG Fabiano Rosas
2023-05-09 14:40 ` Richard Henderson
2023-05-08 18:16 ` [PATCH v3 2/3] target/arm: Select CONFIG_ARM_V7M when TCG is enabled Fabiano Rosas
2023-05-09 14:40 ` Richard Henderson
2023-05-09 14:49 ` Philippe Mathieu-Daudé
2023-05-09 15:24 ` Paolo Bonzini
2023-05-08 18:16 ` Fabiano Rosas [this message]
2023-05-09 6:51 ` [PATCH v3 3/3] tests/qtest: Don't run cdrom boot tests if no accelerator is present Thomas Huth
2023-05-12 14:49 ` [PATCH v3 0/3] target/arm: disable-tcg and without-default-devices fixes Peter Maydell
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=20230508181611.2621-4-farosas@suse.de \
--to=farosas@suse.de \
--cc=alex.bennee@linaro.org \
--cc=jsnow@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.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;
as well as URLs for NNTP newsgroup(s).