Blob Blame History Raw
From b1ea78652ddcb8084c3319d78fff928679c1a753 Mon Sep 17 00:00:00 2001
From: dgibson <dgibson@redhat.com>
Date: Mon, 8 Sep 2014 03:41:42 +0200
Subject: [PATCH 19/32] RHEL only: Disable tests that don't work with RHEL
 build on ppc

Message-id: <1410147705-12993-3-git-send-email-dgibson@redhat.com>
Patchwork-id: 60892
O-Subject: [PATCH qemu-kvm-rhev RHEV7.1 2/5] RHEL only: Disable tests that don't work with RHEL build on ppc
Bugzilla: 1113998
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>

Some of the ppc testsuite cases rely on the PReP and various Macintosh and
embedded machine types, which we don't support in the RHEL build of
qemu-kvm-rhev.  We disable those tests so that the rest of make check can
work properly.

Signed-off-by: David Gibson <dgibson@redhat.com>

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 tests/boot-order-test.c | 7 +++++++
 tests/endianness-test.c | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/tests/boot-order-test.c b/tests/boot-order-test.c
index 360a691..4249157 100644
--- a/tests/boot-order-test.c
+++ b/tests/boot-order-test.c
@@ -112,6 +112,7 @@ static void test_pc_boot_order(void)
     test_boot_orders(NULL, read_boot_order_pc, test_cases_pc);
 }
 
+#if 0 /* Disabled for RHEL, since CONFIG_MAC and CONFIG_PREP are not enabled */
 static uint8_t read_m48t59(uint64_t addr, uint16_t reg)
 {
     writeb(addr, reg & 0xff);
@@ -142,6 +143,7 @@ static uint64_t read_boot_order_pmac(void)
 
     return qfw_cfg_get_u16(fw_cfg, FW_CFG_BOOT_DEVICE);
 }
+#endif /* Disabled for RHEL, since CONFIG_MAC and CONFIG_PREP are not enabled */
 
 static const boot_order_test test_cases_fw_cfg[] = {
     { "", 'c', 'c' },
@@ -151,6 +153,7 @@ static const boot_order_test test_cases_fw_cfg[] = {
     {}
 };
 
+#if 0 /* Disabled for RHEL, since CONFIG_MAC and CONFIG_PREP are not enabled */
 static void test_pmac_oldworld_boot_order(void)
 {
     test_boot_orders("g3beige", read_boot_order_pmac, test_cases_fw_cfg);
@@ -159,7 +162,9 @@ static void test_pmac_oldworld_boot_order(void)
 static void test_pmac_newworld_boot_order(void)
 {
     test_boot_orders("mac99", read_boot_order_pmac, test_cases_fw_cfg);
+
 }
+#endif /* Disabled for RHEL, since CONFIG_MAC and CONFIG_PREP are not enabled */
 
 static uint64_t read_boot_order_sun4m(void)
 {
@@ -194,11 +199,13 @@ int main(int argc, char *argv[])
     if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
         qtest_add_func("boot-order/pc", test_pc_boot_order);
     } else if (strcmp(arch, "ppc") == 0 || strcmp(arch, "ppc64") == 0) {
+#if 0 /* Disabled for RHEL, since CONFIG_MAC and CONFIG_PREP are not enabled */
         qtest_add_func("boot-order/prep", test_prep_boot_order);
         qtest_add_func("boot-order/pmac_oldworld",
                        test_pmac_oldworld_boot_order);
         qtest_add_func("boot-order/pmac_newworld",
                        test_pmac_newworld_boot_order);
+#endif /* Disabled for RHEL, since CONFIG_MAC and CONFIG_PREP are not enabled */
     } else if (strcmp(arch, "sparc") == 0) {
         qtest_add_func("boot-order/sun4m", test_sun4m_boot_order);
     } else if (strcmp(arch, "sparc64") == 0) {
diff --git a/tests/endianness-test.c b/tests/endianness-test.c
index 92e17d2..0acac00 100644
--- a/tests/endianness-test.c
+++ b/tests/endianness-test.c
@@ -40,10 +40,12 @@ static const TestCase test_cases[] = {
     { "mips64", "mips", 0x14000000, .bswap = true },
     { "mips64", "malta", 0x10000000, .bswap = true },
     { "mips64el", "fulong2e", 0x1fd00000 },
+#if 0 /* Disabled for RHEL, since only pseries machine is enabled */
     { "ppc", "g3beige", 0xfe000000, .bswap = true, .superio = "i82378" },
     { "ppc", "prep", 0x80000000, .bswap = true },
     { "ppc", "bamboo", 0xe8000000, .bswap = true, .superio = "i82378" },
     { "ppc64", "mac99", 0xf2000000, .bswap = true, .superio = "i82378" },
+#endif /* Disabled for RHEL, since CONFIG_MAC is not enabled */
     { "ppc64", "pseries", 0x10080000000ULL,
       .bswap = true, .superio = "i82378" },
     { "sh4", "r2d", 0xfe240000, .superio = "i82378" },
-- 
1.8.3.1