From nobody Sat Oct 25 08:34:33 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1518607930747850.6311378453294; Wed, 14 Feb 2018 03:32:10 -0800 (PST) Received: from localhost ([::1]:37586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elvIH-00087U-TH for importer@patchew.org; Wed, 14 Feb 2018 06:32:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elv7Y-0006Yy-Vy for qemu-devel@nongnu.org; Wed, 14 Feb 2018 06:21:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elv7Y-0007GW-0v for qemu-devel@nongnu.org; Wed, 14 Feb 2018 06:21:04 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57186 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1elv7X-0007GO-SK for qemu-devel@nongnu.org; Wed, 14 Feb 2018 06:21:03 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 81AD4EAE91; Wed, 14 Feb 2018 11:21:03 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-136.ams2.redhat.com [10.36.116.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id D9B3D2024CA4; Wed, 14 Feb 2018 11:21:02 +0000 (UTC) From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Date: Wed, 14 Feb 2018 12:20:34 +0100 Message-Id: <1518607234-17739-19-git-send-email-thuth@redhat.com> In-Reply-To: <1518607234-17739-1-git-send-email-thuth@redhat.com> References: <1518607234-17739-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 14 Feb 2018 11:21:03 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 14 Feb 2018 11:21:03 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'thuth@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 18/18] tests/m48t59: Use the m48t59 test on ppc, too X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- 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 +=3D tests/boot-order-test$(EXESUF) check-qtest-ppc-y +=3D tests/prom-env-test$(EXESUF) check-qtest-ppc-y +=3D tests/drive_del-test$(EXESUF) check-qtest-ppc-y +=3D tests/boot-serial-test$(EXESUF) +check-qtest-ppc-y +=3D tests/m48t59-test$(EXESUF) +gcov-files-ppc-y +=3D hw/timer/m48t59.c =20 check-qtest-ppc64-y =3D $(check-qtest-ppc-y) gcov-files-ppc64-y =3D $(subst ppc-softmmu/,ppc64-softmmu/,$(gcov-files-pp= c-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 =3D 0x1ff0; /* 0x7f0 for m48t02 */ static int base_year; +static const char *base_machine; static bool use_mmio; =20 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) =20 static QTestState *m48t59_qtest_start(void) { - return qtest_init("-rtc clock=3Dvm"); + return qtest_startf("-M %s -rtc clock=3Dvm", base_machine); } =20 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 fi= rst */ base =3D 0x71200000; base_year =3D 1968; + base_machine =3D "SS-5"; + use_mmio =3D true; + } else if (g_str_equal(arch, "ppc") || g_str_equal(arch, "ppc64")) { + base =3D 0xF0000000; + base_year =3D 1968; + base_machine =3D "ref405ep"; use_mmio =3D true; } else { g_assert_not_reached(); --=20 1.8.3.1