[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 03/12] tests/qtest: Add dependence on PCIE_ROOT for virtio-net-fa
From: |
Fabiano Rosas |
Subject: |
[PATCH 03/12] tests/qtest: Add dependence on PCIE_ROOT for virtio-net-failover.c |
Date: |
Mon, 6 Feb 2023 12:04:07 -0300 |
This test depends on the presence of the pcie-root-port device. Add a
build time dependency and a runtime check.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
tests/qtest/meson.build | 3 ++-
tests/qtest/virtio-net-failover.c | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index e97616d327..431b623df9 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -73,7 +73,8 @@ qtests_i386 = \
(config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) +
\
(config_host.has_key('CONFIG_POSIX') and
\
config_all_devices.has_key('CONFIG_ACPI_ERST') ? ['erst-test'] : []) +
\
- (config_all_devices.has_key('CONFIG_VIRTIO_NET') and
\
+ (config_all_devices.has_key('CONFIG_PCIE_ROOT') and
\
+ config_all_devices.has_key('CONFIG_VIRTIO_NET') and
\
config_all_devices.has_key('CONFIG_Q35') and
\
config_all_devices.has_key('CONFIG_VIRTIO_PCI') and
\
slirp.found() ? ['virtio-net-failover'] : []) +
\
diff --git a/tests/qtest/virtio-net-failover.c
b/tests/qtest/virtio-net-failover.c
index 4a809590bf..9ca52cb026 100644
--- a/tests/qtest/virtio-net-failover.c
+++ b/tests/qtest/virtio-net-failover.c
@@ -1835,6 +1835,11 @@ int main(int argc, char **argv)
gchar *tmpfile;
int ret;
+ if (!qtest_has_device("pcie-root-port") ||
+ !qtest_has_device("virtio-net")) {
+ return 0;
+ }
+
g_test_init(&argc, &argv, NULL);
ret = g_file_open_tmp("failover_test_migrate-XXXXXX", &tmpfile, NULL);
--
2.35.3
[PATCH 03/12] tests/qtest: Add dependence on PCIE_ROOT for virtio-net-failover.c,
Fabiano Rosas <=
[PATCH 04/12] tests/qtest: Skip virtio-serial-console tests if device not present, Fabiano Rosas, 2023/02/06
[PATCH 05/12] tests/qtest: hd-geo-test: Check for missing devices, Fabiano Rosas, 2023/02/06
[PATCH 06/12] tests/qtest: Skip unplug tests that use missing devices, Fabiano Rosas, 2023/02/06