From: Fabiano Rosas <farosas@suse.de>
To: qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>, Alexander Bulekov <alxndr@bu.edu>,
Paolo Bonzini <pbonzini@redhat.com>, Bandan Das <bsd@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Darren Kenny <darren.kenny@oracle.com>,
Qiuhao Li <Qiuhao.Li@outlook.com>, Fam Zheng <fam@euphon.net>,
Laurent Vivier <lvivier@redhat.com>
Subject: [PATCH v3 02/12] tests/qtest: Do not run lsi53c895a test if device is not present
Date: Mon, 13 Feb 2023 18:07:28 -0300 [thread overview]
Message-ID: <20230213210738.9719-3-farosas@suse.de> (raw)
In-Reply-To: <20230213210738.9719-1-farosas@suse.de>
The tests are built once for all the targets, so as long as one QEMU
binary is built with CONFIG_LSI_SCSI_PCI=y, this test will
run. However some binaries might not include the device. So check this
again in runtime.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/fuzz-lsi53c895a-test.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/qtest/fuzz-lsi53c895a-test.c b/tests/qtest/fuzz-lsi53c895a-test.c
index 392a7ae7ed..a9254b455d 100644
--- a/tests/qtest/fuzz-lsi53c895a-test.c
+++ b/tests/qtest/fuzz-lsi53c895a-test.c
@@ -112,6 +112,10 @@ static void test_lsi_do_dma_empty_queue(void)
int main(int argc, char **argv)
{
+ if (!qtest_has_device("lsi53c895a")) {
+ return 0;
+ }
+
g_test_init(&argc, &argv, NULL);
qtest_add_func("fuzz/lsi53c895a/lsi_do_dma_empty_queue",
--
2.35.3
next prev parent reply other threads:[~2023-02-13 21:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 21:07 [PATCH v3 00/12] qtests vs. default devices Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 01/12] tests/qtest: Skip PXE tests for missing devices Fabiano Rosas
2023-02-13 21:07 ` Fabiano Rosas [this message]
2023-02-13 21:07 ` [PATCH v3 03/12] tests/qtest: Add dependence on PCIE_PORT for virtio-net-failover.c Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 04/12] tests/qtest: Don't build virtio-serial-test.c if device not present Fabiano Rosas
2023-02-14 7:57 ` Thomas Huth
2023-02-13 21:07 ` [PATCH v3 05/12] tests/qtest: hd-geo-test: Check for missing devices Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 06/12] tests/qtest: Fix coding style in device-plug-test.c Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 07/12] tests/qtest: Skip unplug tests that use missing devices Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 08/12] tests/qtest: drive_del-test: Skip tests that require " Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 09/12] tests/qtest: Check for devices in bios-tables-test Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 10/12] tests/qtest: Do not include hexloader-test if loader device is not present Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 11/12] tests/qemu-iotests: Require virtio-scsi-pci Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 12/12] tests/qtest: bios-tables-test: Skip if missing configs Fabiano Rosas
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=20230213210738.9719-3-farosas@suse.de \
--to=farosas@suse.de \
--cc=Qiuhao.Li@outlook.com \
--cc=alxndr@bu.edu \
--cc=bsd@redhat.com \
--cc=darren.kenny@oracle.com \
--cc=fam@euphon.net \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--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).