thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
22c213
From 154215041df085271a780a2989f4f481226e3e34 Mon Sep 17 00:00:00 2001
22c213
From: Miroslav Rezanina <mrezanin@redhat.com>
22c213
Date: Fri, 19 Oct 2018 13:48:41 +0200
22c213
Subject: Enable make check
22c213
22c213
Fixing tests after device disabling and machine types changes and enabling
22c213
make check run during build.
22c213
22c213
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
22c213
22c213
Rebase changes (4.0.0):
22c213
- Remove testing for pseries-2.7 in endianess test
22c213
- Disable device-plug-test on s390x as it use disabled device
22c213
- Do not run cpu-plug-tests on 7.3 and older machine types
22c213
22c213
Rebase changes (4.1.0-rc0):
22c213
- removed iotests 068
22c213
22c213
Rebase changes (4.1.0-rc1):
22c213
- remove all 205 tests (unstable)
22c213
22c213
Rebase changes (4.2.0-rc0):
22c213
- partially disable hd-geo-test (requires lsi53c895a)
22c213
22c213
Merged patches (4.0.0):
22c213
- f7ffd13 Remove 7 qcow2 and luks iotests that are taking > 25 sec to run during the fast train build proce
22c213
22c213
Merged patches (4.1.0-rc0):
22c213
- 41288ff redhat: Remove raw iotest 205
22c213
22c213
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
22c213
---
22c213
 redhat/qemu-kvm.spec.template |  2 +-
22c213
 tests/Makefile.include        | 10 +++++-----
22c213
 tests/boot-serial-test.c      |  6 +++++-
22c213
 tests/cpu-plug-test.c         |  4 ++--
22c213
 tests/e1000-test.c            |  2 ++
22c213
 tests/hd-geo-test.c           |  4 ++++
22c213
 tests/prom-env-test.c         |  4 ++++
22c213
 tests/qemu-iotests/051        | 12 ++++++------
22c213
 tests/qemu-iotests/group      |  4 ++--
22c213
 tests/test-x86-cpuid-compat.c |  2 ++
22c213
 tests/usb-hcd-xhci-test.c     |  4 ++++
22c213
 11 files changed, 37 insertions(+), 17 deletions(-)
22c213
22c213
diff --git a/tests/Makefile.include b/tests/Makefile.include
22c213
index b483790cf3..53bdbdfee0 100644
22c213
--- a/tests/Makefile.include
22c213
+++ b/tests/Makefile.include
22c213
@@ -172,7 +172,7 @@ check-qtest-i386-y += tests/ide-test$(EXESUF)
22c213
 check-qtest-i386-y += tests/ahci-test$(EXESUF)
22c213
 check-qtest-i386-y += tests/hd-geo-test$(EXESUF)
22c213
 check-qtest-i386-y += tests/boot-order-test$(EXESUF)
22c213
-check-qtest-i386-y += tests/bios-tables-test$(EXESUF)
22c213
+#check-qtest-i386-y += tests/bios-tables-test$(EXESUF)
22c213
 check-qtest-i386-$(CONFIG_SGA) += tests/boot-serial-test$(EXESUF)
22c213
 check-qtest-i386-$(CONFIG_SLIRP) += tests/pxe-test$(EXESUF)
22c213
 check-qtest-i386-y += tests/rtc-test$(EXESUF)
22c213
@@ -230,7 +230,7 @@ check-qtest-mips64el-$(CONFIG_VGA) += tests/display-vga-test$(EXESUF)
22c213
 check-qtest-moxie-y += tests/boot-serial-test$(EXESUF)
22c213
 
22c213
 check-qtest-ppc-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
22c213
-check-qtest-ppc-y += tests/boot-order-test$(EXESUF)
22c213
+#check-qtest-ppc-y += tests/boot-order-test$(EXESUF)
22c213
 check-qtest-ppc-y += tests/prom-env-test$(EXESUF)
22c213
 check-qtest-ppc-y += tests/drive_del-test$(EXESUF)
22c213
 check-qtest-ppc-y += tests/boot-serial-test$(EXESUF)
22c213
@@ -244,8 +244,8 @@ check-qtest-ppc64-$(CONFIG_PSERIES) += tests/rtas-test$(EXESUF)
22c213
 check-qtest-ppc64-$(CONFIG_SLIRP) += tests/pxe-test$(EXESUF)
22c213
 check-qtest-ppc64-$(CONFIG_USB_UHCI) += tests/usb-hcd-uhci-test$(EXESUF)
22c213
 check-qtest-ppc64-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
22c213
-check-qtest-ppc64-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
22c213
-check-qtest-ppc64-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
22c213
+#check-qtest-ppc64-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
22c213
+#check-qtest-ppc64-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
22c213
 check-qtest-ppc64-$(CONFIG_RTL8139_PCI) += tests/test-filter-redirector$(EXESUF)
22c213
 check-qtest-ppc64-$(CONFIG_VGA) += tests/display-vga-test$(EXESUF)
22c213
 check-qtest-ppc64-y += tests/numa-test$(EXESUF)
22c213
@@ -291,7 +291,7 @@ check-qtest-s390x-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
22c213
 check-qtest-s390x-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
22c213
 check-qtest-s390x-$(CONFIG_POSIX) += tests/test-filter-redirector$(EXESUF)
22c213
 check-qtest-s390x-y += tests/drive_del-test$(EXESUF)
22c213
-check-qtest-s390x-y += tests/device-plug-test$(EXESUF)
22c213
+#check-qtest-s390x-y += tests/device-plug-test$(EXESUF)
22c213
 check-qtest-s390x-y += tests/virtio-ccw-test$(EXESUF)
22c213
 check-qtest-s390x-y += tests/cpu-plug-test$(EXESUF)
22c213
 check-qtest-s390x-y += tests/migration-test$(EXESUF)
22c213
diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
22c213
index d3a54a0ba5..33ce72b89c 100644
22c213
--- a/tests/boot-serial-test.c
22c213
+++ b/tests/boot-serial-test.c
22c213
@@ -108,19 +108,23 @@ static testdef_t tests[] = {
22c213
     { "ppc", "g3beige", "", "PowerPC,750" },
22c213
     { "ppc", "mac99", "", "PowerPC,G4" },
22c213
     { "ppc", "sam460ex", "-m 256", "DRAM:  256 MiB" },
22c213
+#if 0 /* Disabled for Red Hat Enterprise Linux */
22c213
     { "ppc64", "ppce500", "", "U-Boot" },
22c213
     { "ppc64", "40p", "-m 192", "Memory: 192M" },
22c213
     { "ppc64", "mac99", "", "PowerPC,970FX" },
22c213
+#endif
22c213
     { "ppc64", "pseries",
22c213
       "-machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken",
22c213
       "Open Firmware" },
22c213
+#if 0 /* Disabled for Red Hat Enterprise Linux */
22c213
     { "ppc64", "powernv8", "", "OPAL" },
22c213
     { "ppc64", "powernv9", "", "OPAL" },
22c213
     { "ppc64", "sam460ex", "-device e1000", "8086  100e" },
22c213
+#endif
22c213
     { "i386", "isapc", "-cpu qemu32 -device sga", "SGABIOS" },
22c213
     { "i386", "pc", "-device sga", "SGABIOS" },
22c213
     { "i386", "q35", "-device sga", "SGABIOS" },
22c213
-    { "x86_64", "isapc", "-cpu qemu32 -device sga", "SGABIOS" },
22c213
+    { "x86_64", "pc", "-cpu qemu32 -device sga", "SGABIOS" },
22c213
     { "x86_64", "q35", "-device sga", "SGABIOS" },
22c213
     { "sparc", "LX", "", "TMS390S10" },
22c213
     { "sparc", "SS-4", "", "MB86904" },
22c213
diff --git a/tests/cpu-plug-test.c b/tests/cpu-plug-test.c
22c213
index 30e514bbfb..a04beae1c6 100644
22c213
--- a/tests/cpu-plug-test.c
22c213
+++ b/tests/cpu-plug-test.c
22c213
@@ -185,8 +185,8 @@ static void add_pseries_test_case(const char *mname)
22c213
     char *path;
22c213
     PlugTestData *data;
22c213
 
22c213
-    if (!g_str_has_prefix(mname, "pseries-") ||
22c213
-        (g_str_has_prefix(mname, "pseries-2.") && atoi(&mname[10]) < 7)) {
22c213
+    if (!g_str_has_prefix(mname, "pseries-rhel") ||
22c213
+        (g_str_has_prefix(mname, "pseries-rhel7.") && atoi(&mname[14]) < 4)) {
22c213
         return;
22c213
     }
22c213
     data = g_new(PlugTestData, 1);
22c213
diff --git a/tests/e1000-test.c b/tests/e1000-test.c
22c213
index c387984ef6..c89112d6f8 100644
22c213
--- a/tests/e1000-test.c
22c213
+++ b/tests/e1000-test.c
22c213
@@ -22,9 +22,11 @@ struct QE1000 {
22c213
 
22c213
 static const char *models[] = {
22c213
     "e1000",
22c213
+#if 0 /* Disabled for Red Hat Enterprise Linux */
22c213
     "e1000-82540em",
22c213
     "e1000-82544gc",
22c213
     "e1000-82545em",
22c213
+#endif
22c213
 };
22c213
 
22c213
 static void *e1000_get_driver(void *obj, const char *interface)
22c213
diff --git a/tests/hd-geo-test.c b/tests/hd-geo-test.c
22c213
index 7e86c5416c..cc068bad87 100644
22c213
--- a/tests/hd-geo-test.c
22c213
+++ b/tests/hd-geo-test.c
22c213
@@ -732,6 +732,7 @@ static void test_override_ide(void)
22c213
     test_override(args, expected);
22c213
 }
22c213
 
22c213
+#if 0 /* Require lsi53c895a - not supported on RHEL */
22c213
 static void test_override_scsi(void)
22c213
 {
22c213
     TestArgs *args = create_args();
22c213
@@ -776,6 +777,7 @@ static void test_override_scsi_2_controllers(void)
22c213
     add_scsi_disk(args, 3, 1, 0, 1, 2, 0, 1, 0);
22c213
     test_override(args, expected);
22c213
 }
22c213
+#endif
22c213
 
22c213
 static void test_override_virtio_blk(void)
22c213
 {
22c213
@@ -951,9 +953,11 @@ int main(int argc, char **argv)
22c213
     qtest_add_func("hd-geo/ide/device/user/chst", test_ide_device_user_chst);
22c213
     if (have_qemu_img()) {
22c213
         qtest_add_func("hd-geo/override/ide", test_override_ide);
22c213
+#if 0 /* Require lsi53c895a - not supported on RHEL */
22c213
         qtest_add_func("hd-geo/override/scsi", test_override_scsi);
22c213
         qtest_add_func("hd-geo/override/scsi_2_controllers",
22c213
                        test_override_scsi_2_controllers);
22c213
+#endif
22c213
         qtest_add_func("hd-geo/override/virtio_blk", test_override_virtio_blk);
22c213
         qtest_add_func("hd-geo/override/zero_chs", test_override_zero_chs);
22c213
         qtest_add_func("hd-geo/override/scsi_hot_unplug",
22c213
diff --git a/tests/prom-env-test.c b/tests/prom-env-test.c
22c213
index 61bc1d1e7b..028d45c7d7 100644
22c213
--- a/tests/prom-env-test.c
22c213
+++ b/tests/prom-env-test.c
22c213
@@ -88,10 +88,14 @@ int main(int argc, char *argv[])
22c213
     if (!strcmp(arch, "ppc")) {
22c213
         add_tests(ppc_machines);
22c213
     } else if (!strcmp(arch, "ppc64")) {
22c213
+#if 0 /* Disabled for Red Hat Enterprise Linux */
22c213
         add_tests(ppc_machines);
22c213
         if (g_test_slow()) {
22c213
+#endif
22c213
             qtest_add_data_func("prom-env/pseries", "pseries", test_machine);
22c213
+#if 0 /* Disabled for Red Hat Enterprise Linux */
22c213
         }
22c213
+#endif
22c213
     } else if (!strcmp(arch, "sparc")) {
22c213
         add_tests(sparc_machines);
22c213
     } else if (!strcmp(arch, "sparc64")) {
22c213
diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
22c213
index 53bcdbc911..b387e0c233 100755
22c213
--- a/tests/qemu-iotests/051
22c213
+++ b/tests/qemu-iotests/051
22c213
@@ -181,11 +181,11 @@ run_qemu -drive if=virtio
22c213
 case "$QEMU_DEFAULT_MACHINE" in
22c213
     pc)
22c213
         run_qemu -drive if=none,id=disk -device ide-cd,drive=disk
22c213
-        run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
22c213
+#        run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
22c213
         run_qemu -drive if=none,id=disk -device ide-drive,drive=disk
22c213
         run_qemu -drive if=none,id=disk -device ide-hd,drive=disk
22c213
-        run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
22c213
-        run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
22c213
+#        run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
22c213
+#        run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
22c213
         ;;
22c213
      *)
22c213
         ;;
22c213
@@ -234,11 +234,11 @@ run_qemu -drive file="$TEST_IMG",if=virtio,readonly=on
22c213
 case "$QEMU_DEFAULT_MACHINE" in
22c213
     pc)
22c213
         run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-cd,drive=disk
22c213
-        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
22c213
+#        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
22c213
         run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-drive,drive=disk
22c213
         run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-hd,drive=disk
22c213
-        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
22c213
-        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
22c213
+#        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
22c213
+#        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
22c213
         ;;
22c213
      *)
22c213
         ;;
22c213
diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group
22c213
index 6b10a6a762..06cc734b26 100644
22c213
--- a/tests/qemu-iotests/group
22c213
+++ b/tests/qemu-iotests/group
22c213
@@ -92,7 +92,7 @@
22c213
 068 rw quick
22c213
 069 rw auto quick
22c213
 070 rw quick
22c213
-071 rw auto quick
22c213
+# 071 rw auto quick -- requires whitelisted blkverify
22c213
 072 rw auto quick
22c213
 073 rw auto quick
22c213
 074 rw auto quick
22c213
@@ -120,7 +120,7 @@
22c213
 096 rw quick
22c213
 097 rw auto backing
22c213
 098 rw auto backing quick
22c213
-099 rw auto quick
22c213
+# 099 rw auto quick  -- requires whitelisted blkverify
22c213
 # 100 was removed, do not reuse
22c213
 101 rw quick
22c213
 102 rw quick
22c213
diff --git a/tests/test-x86-cpuid-compat.c b/tests/test-x86-cpuid-compat.c
22c213
index 772287bdb4..e7c075ed98 100644
22c213
--- a/tests/test-x86-cpuid-compat.c
22c213
+++ b/tests/test-x86-cpuid-compat.c
22c213
@@ -300,6 +300,7 @@ int main(int argc, char **argv)
22c213
                    "-cpu 486,xlevel2=0xC0000002,+xstore",
22c213
                    "xlevel2", 0xC0000002);
22c213
 
22c213
+#if 0 /* Disabled in Red Hat Enterprise Linux */
22c213
     /* Check compatibility of old machine-types that didn't
22c213
      * auto-increase level/xlevel/xlevel2: */
22c213
 
22c213
@@ -350,6 +351,7 @@ int main(int argc, char **argv)
22c213
     add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.4/npt-on",
22c213
                    "-machine pc-i440fx-2.4 -cpu SandyBridge,+npt",
22c213
                    "xlevel", 0x80000008);
22c213
+#endif
22c213
 
22c213
     /* Test feature parsing */
22c213
     add_feature_test("x86/cpuid/features/plus",
22c213
diff --git a/tests/usb-hcd-xhci-test.c b/tests/usb-hcd-xhci-test.c
22c213
index 10ef9d2a91..3855873050 100644
22c213
--- a/tests/usb-hcd-xhci-test.c
22c213
+++ b/tests/usb-hcd-xhci-test.c
22c213
@@ -21,6 +21,7 @@ static void test_xhci_hotplug(void)
22c213
     usb_test_hotplug(global_qtest, "xhci", "1", NULL);
22c213
 }
22c213
 
22c213
+#if 0 /* Disabled for Red Hat Enterprise Linux */
22c213
 static void test_usb_uas_hotplug(void)
22c213
 {
22c213
     QTestState *qts = global_qtest;
22c213
@@ -36,6 +37,7 @@ static void test_usb_uas_hotplug(void)
22c213
     qtest_qmp_device_del(qts, "scsihd");
22c213
     qtest_qmp_device_del(qts, "uas");
22c213
 }
22c213
+#endif
22c213
 
22c213
 static void test_usb_ccid_hotplug(void)
22c213
 {
22c213
@@ -56,7 +58,9 @@ int main(int argc, char **argv)
22c213
 
22c213
     qtest_add_func("/xhci/pci/init", test_xhci_init);
22c213
     qtest_add_func("/xhci/pci/hotplug", test_xhci_hotplug);
22c213
+#if 0 /* Disabled for Red Hat Enterprise Linux */
22c213
     qtest_add_func("/xhci/pci/hotplug/usb-uas", test_usb_uas_hotplug);
22c213
+#endif
22c213
     qtest_add_func("/xhci/pci/hotplug/usb-ccid", test_usb_ccid_hotplug);
22c213
 
22c213
     qtest_start("-device nec-usb-xhci,id=xhci"
22c213
-- 
22c213
2.21.0
22c213