8b49639
From 5e419e5e0a721bdbbfa6d9b82c8be5c5b3d26a01 Mon Sep 17 00:00:00 2001
8b49639
From: Miroslav Rezanina <mrezanin@redhat.com>
8b49639
Date: Wed, 2 Sep 2020 09:39:41 +0200
8b49639
Subject: Enable make check
8b49639
8b49639
Fixing tests after device disabling and machine types changes and enabling
8b49639
make check run during build.
8b49639
8b49639
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
8b49639
---
8b49639
Rebase changes (6.1.0):
8b49639
- removed unnecessary test changes
8b49639
8b49639
Rebase changes (6.2.0):
8b49639
- new way of disabling bios-table-test
8b49639
8b49639
Rebase changes (7.0.0):
8b49639
- Disable testing virtio-iommu-pci
8b49639
- Rename default_bus_bypass_iommu property to default-bus-bypass-iommu
8b49639
- Disable qtest-bios-table for aarch64
8b49639
- Removed redhat chunks for boot-serial-test.c, cdrom-test.c and cpu-plug-test.c qtests
8b49639
- Do not disable boot-order-test, prom-env-test and boot-serial-test qtests
8b49639
- Use rhel machine type for new intel hda qtest
8b49639
- Remove unnecessary changes in iotest 051
8b49639
- Remove changes in bios-tables-test.c and prom-env-test.c qtests
8b49639
8b49639
Merged patches (6.1.0):
8b49639
- 2f129df7d3 redhat: Enable the 'test-block-iothread' test again
8b49639
---
8b49639
 .distro/qemu-kvm.spec.template      | 5 ++---
8b49639
 tests/qtest/fuzz-e1000e-test.c      | 2 +-
8b49639
 tests/qtest/fuzz-virtio-scsi-test.c | 2 +-
8b49639
 tests/qtest/intel-hda-test.c        | 2 +-
8b49639
 tests/qtest/libqos/meson.build      | 2 +-
8b49639
 tests/qtest/lpc-ich9-test.c         | 2 +-
8b49639
 tests/qtest/meson.build             | 4 ----
8b49639
 tests/qtest/usb-hcd-xhci-test.c     | 4 ++++
8b49639
 tests/qtest/virtio-net-failover.c   | 1 +
8b49639
 9 files changed, 12 insertions(+), 12 deletions(-)
8b49639
8b49639
diff --git a/tests/qtest/fuzz-e1000e-test.c b/tests/qtest/fuzz-e1000e-test.c
8b49639
index 66229e6096..947fba73b7 100644
8b49639
--- a/tests/qtest/fuzz-e1000e-test.c
8b49639
+++ b/tests/qtest/fuzz-e1000e-test.c
8b49639
@@ -17,7 +17,7 @@ static void test_lp1879531_eth_get_rss_ex_dst_addr(void)
8b49639
 {
8b49639
     QTestState *s;
8b49639
 
8b49639
-    s = qtest_init("-nographic -monitor none -serial none -M pc-q35-5.0");
8b49639
+    s = qtest_init("-nographic -monitor none -serial none -M pc-q35-rhel8.4.0");
8b49639
 
8b49639
     qtest_outl(s, 0xcf8, 0x80001010);
8b49639
     qtest_outl(s, 0xcfc, 0xe1020000);
8b49639
diff --git a/tests/qtest/fuzz-virtio-scsi-test.c b/tests/qtest/fuzz-virtio-scsi-test.c
8b49639
index aaf6d10e18..43727d62ac 100644
8b49639
--- a/tests/qtest/fuzz-virtio-scsi-test.c
8b49639
+++ b/tests/qtest/fuzz-virtio-scsi-test.c
8b49639
@@ -19,7 +19,7 @@ static void test_mmio_oob_from_memory_region_cache(void)
8b49639
 {
8b49639
     QTestState *s;
8b49639
 
8b49639
-    s = qtest_init("-M pc-q35-5.2 -display none -m 512M "
8b49639
+    s = qtest_init("-M pc-q35-rhel8.4.0 -display none -m 512M "
8b49639
                    "-device virtio-scsi,num_queues=8,addr=03.0 ");
8b49639
 
8b49639
     qtest_outl(s, 0xcf8, 0x80001811);
8b49639
diff --git a/tests/qtest/intel-hda-test.c b/tests/qtest/intel-hda-test.c
8b49639
index a58c98e4d1..c8387e39ce 100644
8b49639
--- a/tests/qtest/intel-hda-test.c
8b49639
+++ b/tests/qtest/intel-hda-test.c
8b49639
@@ -38,7 +38,7 @@ static void test_issue542_ich6(void)
8b49639
 {
8b49639
     QTestState *s;
8b49639
 
8b49639
-    s = qtest_init("-nographic -nodefaults -M pc-q35-6.2 "
8b49639
+    s = qtest_init("-nographic -nodefaults -M pc-q35-rhel9.0.0 "
8b49639
                    "-device intel-hda,id=" HDA_ID CODEC_DEVICES);
8b49639
 
8b49639
     qtest_outl(s, 0xcf8, 0x80000804);
8b49639
diff --git a/tests/qtest/libqos/meson.build b/tests/qtest/libqos/meson.build
8b49639
index e988d15791..46f7dcb81a 100644
8b49639
--- a/tests/qtest/libqos/meson.build
8b49639
+++ b/tests/qtest/libqos/meson.build
8b49639
@@ -41,7 +41,7 @@ libqos_srcs = files('../libqtest.c',
8b49639
         'virtio-rng.c',
8b49639
         'virtio-scsi.c',
8b49639
         'virtio-serial.c',
8b49639
-        'virtio-iommu.c',
8b49639
+#        'virtio-iommu.c',
8b49639
 
8b49639
         # qgraph machines:
8b49639
         'aarch64-xlnx-zcu102-machine.c',
8b49639
diff --git a/tests/qtest/lpc-ich9-test.c b/tests/qtest/lpc-ich9-test.c
8b49639
index fe0bef9980..7a9d51579b 100644
8b49639
--- a/tests/qtest/lpc-ich9-test.c
8b49639
+++ b/tests/qtest/lpc-ich9-test.c
8b49639
@@ -15,7 +15,7 @@ static void test_lp1878642_pci_bus_get_irq_level_assert(void)
8b49639
 {
8b49639
     QTestState *s;
8b49639
 
8b49639
-    s = qtest_init("-M pc-q35-5.0 "
8b49639
+    s = qtest_init("-M pc-q35-rhel8.4.0 "
8b49639
                    "-nographic -monitor none -serial none");
8b49639
 
8b49639
     qtest_outl(s, 0xcf8, 0x8000f840); /* PMBASE */
8b49639
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
8b49639
index d25f82bb5a..67cd32def1 100644
8b49639
--- a/tests/qtest/meson.build
8b49639
+++ b/tests/qtest/meson.build
8b49639
@@ -73,7 +73,6 @@ qtests_i386 = \
8b49639
    config_all_devices.has_key('CONFIG_Q35') and                                             \
8b49639
    config_all_devices.has_key('CONFIG_VIRTIO_PCI') and                                      \
8b49639
    slirp.found() ? ['virtio-net-failover'] : []) +                                          \
8b49639
-  (unpack_edk2_blobs ? ['bios-tables-test'] : []) +                                         \
8b49639
   qtests_pci +                                                                              \
8b49639
   ['fdc-test',
8b49639
    'ide-test',
8b49639
@@ -86,7 +85,6 @@ qtests_i386 = \
8b49639
    'drive_del-test',
8b49639
    'tco-test',
8b49639
    'cpu-plug-test',
8b49639
-   'q35-test',
8b49639
    'vmgenid-test',
8b49639
    'migration-test',
8b49639
    'test-x86-cpuid-compat',
8b49639
@@ -216,7 +214,6 @@ qtests_arm = \
8b49639
 
8b49639
 # TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional
8b49639
 qtests_aarch64 = \
8b49639
-  (cpu != 'arm' and unpack_edk2_blobs ? ['bios-tables-test'] : []) +                            \
8b49639
   (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-test'] : []) +        \
8b49639
   (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-swtpm-test'] : []) +  \
8b49639
   (config_all_devices.has_key('CONFIG_XLNX_ZYNQMP_ARM') ? ['xlnx-can-test', 'fuzz-xlnx-dp-test'] : []) + \
8b49639
@@ -231,7 +228,6 @@ qtests_s390x = \
8b49639
   (config_host.has_key('CONFIG_POSIX') ? ['test-filter-redirector'] : []) +                     \
8b49639
   ['boot-serial-test',
8b49639
    'drive_del-test',
8b49639
-   'device-plug-test',
8b49639
    'virtio-ccw-test',
8b49639
    'cpu-plug-test',
8b49639
    'migration-test']
8b49639
diff --git a/tests/qtest/usb-hcd-xhci-test.c b/tests/qtest/usb-hcd-xhci-test.c
8b49639
index 10ef9d2a91..3855873050 100644
8b49639
--- a/tests/qtest/usb-hcd-xhci-test.c
8b49639
+++ b/tests/qtest/usb-hcd-xhci-test.c
8b49639
@@ -21,6 +21,7 @@ static void test_xhci_hotplug(void)
8b49639
     usb_test_hotplug(global_qtest, "xhci", "1", NULL);
8b49639
 }
8b49639
 
8b49639
+#if 0 /* Disabled for Red Hat Enterprise Linux */
8b49639
 static void test_usb_uas_hotplug(void)
8b49639
 {
8b49639
     QTestState *qts = global_qtest;
8b49639
@@ -36,6 +37,7 @@ static void test_usb_uas_hotplug(void)
8b49639
     qtest_qmp_device_del(qts, "scsihd");
8b49639
     qtest_qmp_device_del(qts, "uas");
8b49639
 }
8b49639
+#endif
8b49639
 
8b49639
 static void test_usb_ccid_hotplug(void)
8b49639
 {
8b49639
@@ -56,7 +58,9 @@ int main(int argc, char **argv)
8b49639
 
8b49639
     qtest_add_func("/xhci/pci/init", test_xhci_init);
8b49639
     qtest_add_func("/xhci/pci/hotplug", test_xhci_hotplug);
8b49639
+#if 0 /* Disabled for Red Hat Enterprise Linux */
8b49639
     qtest_add_func("/xhci/pci/hotplug/usb-uas", test_usb_uas_hotplug);
8b49639
+#endif
8b49639
     qtest_add_func("/xhci/pci/hotplug/usb-ccid", test_usb_ccid_hotplug);
8b49639
 
8b49639
     qtest_start("-device nec-usb-xhci,id=xhci"
8b49639
diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c
8b49639
index 78811f1c92..44de8af00c 100644
8b49639
--- a/tests/qtest/virtio-net-failover.c
8b49639
+++ b/tests/qtest/virtio-net-failover.c
8b49639
@@ -25,6 +25,7 @@
8b49639
 #define PCI_SEL_BASE            0x0010
8b49639
 
8b49639
 #define BASE_MACHINE "-M q35 -nodefaults " \
8b49639
+    "-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=on " \
8b49639
     "-device pcie-root-port,id=root0,addr=0x1,bus=pcie.0,chassis=1 " \
8b49639
     "-device pcie-root-port,id=root1,addr=0x2,bus=pcie.0,chassis=2 "
8b49639
 
8b49639
-- 
8b49639
2.31.1
8b49639