From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: Eric Blake <eblake@redhat.com>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
qemu-ppc@nongnu.org
Subject: [Qemu-devel] [PATCH 4/4] tests/m48t59: Add the m48t59 test on ppc, too
Date: Mon, 12 Feb 2018 13:44:49 +0100 [thread overview]
Message-ID: <1518439489-2724-5-git-send-email-thuth@redhat.com> (raw)
In-Reply-To: <1518439489-2724-1-git-send-email-thuth@redhat.com>
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 <thuth@redhat.com>
---
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 3ac874c..d46807a 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -318,6 +318,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
prev parent reply other threads:[~2018-02-12 12:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 12:44 [Qemu-devel] [PATCH 0/4] Re-enable and extend the m48t59 test Thomas Huth
2018-02-12 12:44 ` [Qemu-devel] [PATCH 1/4] tests/m48t59: Fix and re-enable the test for sparc Thomas Huth
2018-02-12 12:44 ` [Qemu-devel] [PATCH 2/4] tests/m48t59: Make the test independent of global_qtest Thomas Huth
2018-02-12 16:09 ` Eric Blake
2018-02-12 12:44 ` [Qemu-devel] [PATCH 3/4] tests/Makefile: Derive check-qtest-ppc64-y from check-qtest-ppc-y Thomas Huth
2018-02-12 12:44 ` Thomas Huth [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1518439489-2724-5-git-send-email-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=eblake@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).