[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 18/18] tests/m48t59: Use the m48t59 test on ppc, too
From: |
Thomas Huth |
Subject: |
[Qemu-devel] [PULL 18/18] tests/m48t59: Use the m48t59 test on ppc, too |
Date: |
Wed, 14 Feb 2018 12:20:34 +0100 |
The ref405ep machine has a memory-mapped m48t59 device, so
we can run the m48t59 test on this machine, too.
Signed-off-by: Thomas Huth <address@hidden>
---
tests/Makefile.include | 2 ++
tests/m48t59-test.c | 9 ++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 95ce99e..a1bcbff 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -319,6 +319,8 @@ check-qtest-ppc-y += tests/boot-order-test$(EXESUF)
check-qtest-ppc-y += tests/prom-env-test$(EXESUF)
check-qtest-ppc-y += tests/drive_del-test$(EXESUF)
check-qtest-ppc-y += tests/boot-serial-test$(EXESUF)
+check-qtest-ppc-y += tests/m48t59-test$(EXESUF)
+gcov-files-ppc-y += hw/timer/m48t59.c
check-qtest-ppc64-y = $(check-qtest-ppc-y)
gcov-files-ppc64-y = $(subst ppc-softmmu/,ppc64-softmmu/,$(gcov-files-ppc-y))
diff --git a/tests/m48t59-test.c b/tests/m48t59-test.c
index 8c25467..26af7d6 100644
--- a/tests/m48t59-test.c
+++ b/tests/m48t59-test.c
@@ -28,6 +28,7 @@
static uint32_t base;
static uint16_t reg_base = 0x1ff0; /* 0x7f0 for m48t02 */
static int base_year;
+static const char *base_machine;
static bool use_mmio;
static uint8_t cmos_read_mmio(QTestState *s, uint8_t reg)
@@ -145,7 +146,7 @@ static void cmos_get_date_time(QTestState *s, struct tm
*date)
static QTestState *m48t59_qtest_start(void)
{
- return qtest_init("-rtc clock=vm");
+ return qtest_startf("-M %s -rtc clock=vm", base_machine);
}
static void bcd_check_time(void)
@@ -241,6 +242,12 @@ static void base_setup(void)
/* Note: For sparc64, we'd need to map-in the PCI bridge memory first
*/
base = 0x71200000;
base_year = 1968;
+ base_machine = "SS-5";
+ use_mmio = true;
+ } else if (g_str_equal(arch, "ppc") || g_str_equal(arch, "ppc64")) {
+ base = 0xF0000000;
+ base_year = 1968;
+ base_machine = "ref405ep";
use_mmio = true;
} else {
g_assert_not_reached();
--
1.8.3.1
- [Qemu-devel] [PULL 07/18] libqos: Use explicit QTestState for ahci operations, (continued)
- [Qemu-devel] [PULL 07/18] libqos: Use explicit QTestState for ahci operations, Thomas Huth, 2018/02/14
- [Qemu-devel] [PULL 09/18] qmp-test: Drop dependence on global_qtest, Thomas Huth, 2018/02/14
- [Qemu-devel] [PULL 08/18] libqos: Use explicit QTestState for remaining libqos operations, Thomas Huth, 2018/02/14
- [Qemu-devel] [PULL 12/18] tests/boot-serial: Enable the boot-serial test on SPARC machines, too, Thomas Huth, 2018/02/14
- [Qemu-devel] [PULL 11/18] wdt_ib700-test: Drop dependence on global_qtest, Thomas Huth, 2018/02/14
- [Qemu-devel] [PULL 10/18] tests/boot-sector: Drop dependence on global_qtest, Thomas Huth, 2018/02/14
- [Qemu-devel] [PULL 13/18] tests/boot-serial: Add tests for PowerPC Mac machines, Thomas Huth, 2018/02/14
- [Qemu-devel] [PULL 14/18] tests/boot-serial-test: Add support for the aarch64 virt machine, Thomas Huth, 2018/02/14
- [Qemu-devel] [PULL 15/18] tests/m48t59: Fix and re-enable the test for sparc, Thomas Huth, 2018/02/14
- [Qemu-devel] [PULL 16/18] tests/m48t59: Make the test independent of global_qtest, Thomas Huth, 2018/02/14
- [Qemu-devel] [PULL 18/18] tests/m48t59: Use the m48t59 test on ppc, too,
Thomas Huth <=
- [Qemu-devel] [PULL 17/18] tests/Makefile: Derive check-qtest-ppc64-y from check-qtest-ppc-y, Thomas Huth, 2018/02/14
- Re: [Qemu-devel] [PULL 00/18] qtest patches, Peter Maydell, 2018/02/15