From patchwork Thu Jul 11 13:46:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Hayward X-Patchwork-Id: 33672 Received: (qmail 19429 invoked by alias); 11 Jul 2019 13:46:42 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 19203 invoked by uid 89); 11 Jul 2019 13:46:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.1 spammy=tdesc X-HELO: EUR02-HE1-obe.outbound.protection.outlook.com Received: from mail-eopbgr10078.outbound.protection.outlook.com (HELO EUR02-HE1-obe.outbound.protection.outlook.com) (40.107.1.78) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Jul 2019 13:46:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9g8pPlQzSEbynhAwwNPRBGbB2Lq4L+awlKqqof3QKlE=; b=xkVwJBCFnYmidn+QJHEShCq1NOD6Y90k3ZFA2ujTE55LYd0VjLvDjsLlqUJHW2CMb8iOtQg5ktlOuYa45VJ+D8HO7DlcOHWJmMMrgVTv49pi5ZyzmM54ZslHYykHiUsgcYe2fx0xlBl8VSvnD1biPyqtnouyevBhglNEaaRRd7Q= Received: from DB6PR0802CA0048.eurprd08.prod.outlook.com (2603:10a6:4:a3::34) by AM6PR08MB4949.eurprd08.prod.outlook.com (2603:10a6:20b:e1::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.19; Thu, 11 Jul 2019 13:46:34 +0000 Received: from AM5EUR03FT039.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::206) by DB6PR0802CA0048.outlook.office365.com (2603:10a6:4:a3::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2052.18 via Frontend Transport; Thu, 11 Jul 2019 13:46:34 +0000 Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; sourceware.org; dmarc=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT039.mail.protection.outlook.com (10.152.17.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2052.18 via Frontend Transport; Thu, 11 Jul 2019 13:46:33 +0000 Received: ("Tessian outbound c6844e6c52ae:v24"); Thu, 11 Jul 2019 13:46:32 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: cbc4c383d3b548ce X-CR-MTA-TID: 64aa7808 Received: from 9375eeb321ac.4 (cr-mta-lb-1.cr-mta-net [104.47.9.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id FF8A4D12-DA4B-4202-B2AE-81601A884A90.1; Thu, 11 Jul 2019 13:46:27 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-ve1eur03lp2053.outbound.protection.outlook.com [104.47.9.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9375eeb321ac.4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 11 Jul 2019 13:46:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9g8pPlQzSEbynhAwwNPRBGbB2Lq4L+awlKqqof3QKlE=; b=xkVwJBCFnYmidn+QJHEShCq1NOD6Y90k3ZFA2ujTE55LYd0VjLvDjsLlqUJHW2CMb8iOtQg5ktlOuYa45VJ+D8HO7DlcOHWJmMMrgVTv49pi5ZyzmM54ZslHYykHiUsgcYe2fx0xlBl8VSvnD1biPyqtnouyevBhglNEaaRRd7Q= Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.227.22) by DB6PR0802MB2232.eurprd08.prod.outlook.com (10.172.226.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.19; Thu, 11 Jul 2019 13:46:26 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::259b:8edf:fb65:2760]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::259b:8edf:fb65:2760%8]) with mapi id 15.20.2052.020; Thu, 11 Jul 2019 13:46:26 +0000 From: Alan Hayward To: "gdb-patches@sourceware.org" CC: nd , Alan Hayward Subject: [PATCH v2 3/5] Arm: Add xml unit tests Date: Thu, 11 Jul 2019 13:46:25 +0000 Message-ID: <20190711134436.47896-4-alan.hayward@arm.com> References: <20190711134436.47896-1-alan.hayward@arm.com> In-Reply-To: <20190711134436.47896-1-alan.hayward@arm.com> Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; X-Microsoft-Antispam-Untrusted: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:DB6PR0802MB2232; x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:6430;OLM:6430; X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(396003)(136003)(366004)(39860400002)(199004)(189003)(54534003)(53936002)(99286004)(66476007)(66556008)(64756008)(2906002)(66946007)(446003)(71200400001)(5640700003)(478600001)(2501003)(66446008)(44832011)(186003)(71190400001)(316002)(1076003)(6436002)(6512007)(486006)(6916009)(2351001)(66066001)(6486002)(76176011)(476003)(102836004)(386003)(52116002)(6506007)(8676002)(11346002)(68736007)(50226002)(26005)(86362001)(7736002)(81166006)(81156014)(2616005)(14454004)(6116002)(4326008)(305945005)(3846002)(36756003)(5660300002)(256004)(54906003)(8936002)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0802MB2232; H:DB6PR0802MB2133.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: GzXjwFYWjrazgsbFBgbcsmdSPIHgs4YyzWAE6YTBo5hYWEbE+WWlU2QNf/I+4k2g/dRT9iqrERXPfDOK2b9wWvyEwwA7fD77sDbEwfCuhBBnatvLEfiB0/Z5O8nxFUOyRf8EzUWrvsVsjzIJjZLubXTcn60N8YerGPMScMSJ+0dUxffhi+z4bEQQDyEhL9V1hJ+plc8lC1Yd5hXI8stgIw8cneDnWOfiyEsFzT965i2p0vVylHhbt1+EHzx6Z3JPNFn4dougFY+KnNh0L/6GkEYgunGZeVsIJa7InPOjgix5uyVAQhLuHwNXCFbuhdC8ph2U5QqIcM3kEu+GffoKD6aYdluBQE9gy4qqz7yimm/WROaWd/n6fTlwJQQYVTIpobr7VavDJDK/Cy56Ih2l4K7odG9BO3YDM+y0eQEogHY= MIME-Version: 1.0 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; Return-Path: Alan.Hayward@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 7953f26a-8b46-4ebc-09c9-08d706062b01 X-IsSubscribed: yes Use the record_xml_tdesc tests to prove the new target descriptions are identical to the previous xml file ones. This is tested as part of gdb.gdb/unittest.exp. gdb/ChangeLog: 2019-07-11 Alan Hayward * arm-tdep.c (_initialize_arm_tdep): Add xml regression tests. --- gdb/arm-tdep.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 1d655eab5c..b500f193df 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -63,6 +63,7 @@ #if GDB_SELF_TEST #include "gdbsupport/selftest.h" +#include "aarch32-tdep.h" #endif static int arm_debug; @@ -9547,6 +9548,23 @@ vfp - VFP co-processor."), #if GDB_SELF_TEST selftests::register_test ("arm-record", selftests::arm_record_test); + + const target_desc *tdesc; + + tdesc = arm_read_description (ARM_FP_TYPE_VFPV2); + selftests::record_xml_tdesc ("arm/arm-with-vfpv2.xml", tdesc); + tdesc = arm_read_description (ARM_FP_TYPE_VFPV3); + selftests::record_xml_tdesc ("arm/arm-with-vfpv3.xml",tdesc); + tdesc = arm_read_description (ARM_FP_TYPE_IWMMXT); + selftests::record_xml_tdesc ("arm/arm-with-iwmmxt.xml", tdesc); + tdesc = arm_read_mprofile_description (ARM_M_TYPE_M_PROFILE); + selftests::record_xml_tdesc ("arm/arm-with-m.xml", tdesc); + tdesc = arm_read_mprofile_description (ARM_M_TYPE_VFP_D16); + selftests::record_xml_tdesc ("arm/arm-with-m-vfp-d16.xml", tdesc); + tdesc = arm_read_mprofile_description (ARM_M_TYPE_WITH_FPA); + selftests::record_xml_tdesc ("arm/arm-with-m-fpa-layout.xml", tdesc); + tdesc = aarch32_read_description (); + selftests::record_xml_tdesc ("arm/arm-with-neon.xml", tdesc); #endif }