From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70070.outbound.protection.outlook.com [40.107.7.70]) by sourceware.org (Postfix) with ESMTPS id 2A228385DC0F; Mon, 20 Jul 2020 11:10:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2A228385DC0F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Alex.Coplan@arm.com 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=+qZDYjlT0pmiGRKrun5kOMO5g3LAdxliTTbwYi8A4pQ=; b=NoYgtwxdZKrWCDDM/3irqZ3Ho5AAHPkUDMkF3eqTlUsHnPcgTOV3chQF+AI/EkybWyObXo2cLlI6GvhZS9cwQHoppl3AVOq37BUaFIA9n3KmwkfxelqisiU7KiSrP09hrNhxLMd27jncRZ3u3DNFlWvxTIudw8Zr+e388itrF9s= Received: from DB7PR02CA0012.eurprd02.prod.outlook.com (2603:10a6:10:52::25) by AM4PR08MB2898.eurprd08.prod.outlook.com (2603:10a6:205:b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.24; Mon, 20 Jul 2020 11:10:46 +0000 Received: from DB5EUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:52:cafe::b3) by DB7PR02CA0012.outlook.office365.com (2603:10a6:10:52::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.17 via Frontend Transport; Mon, 20 Jul 2020 11:10:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT007.mail.protection.outlook.com (10.152.20.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18 via Frontend Transport; Mon, 20 Jul 2020 11:10:46 +0000 Received: ("Tessian outbound 2ae7cfbcc26c:v62"); Mon, 20 Jul 2020 11:10:46 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: fa2be6a8b5cce3f5 X-CR-MTA-TID: 64aa7808 Received: from a2a88173f456.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7C977C40-8806-4D4D-B91D-96D883E786C0.1; Mon, 20 Jul 2020 11:10:40 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a2a88173f456.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 20 Jul 2020 11:10:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DT/bSnaBQlDvG8LBXMoj6FjPBHSKTuhMtnPlrmNNwLb1NEfLkOtiXffcPZelNEhM81gYodFvYgcGDfwlZ6zb2U2K+tsxG6SL1agtQckrBq0UDAUpmSJ4mq3KSX/Poju7FpqB/5mCb27sTtTF6u8OPqdVhg5v4CvDNgTUku+Gpp9cO4AfBdNUnTNfJABZcWpilU7j7pW1xf6Y7r+v99O5F6GwegB5vMbRDJ+jT3hQvmgolsPLljlnz0XwrDqe7pE2btyxt9jK5Kt/ylEpo/Xiq7Vnq1FAYI7nDRkGql7UGzPfM4aLigPPpPeAMNiZbQLYLHdXZvjJQp6lWmWOcUp4LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+qZDYjlT0pmiGRKrun5kOMO5g3LAdxliTTbwYi8A4pQ=; b=nSsO3bMrFtGJGmi/6mdQjEqhIgXE3tvmgFhFGCtjSCLMhuKn3S95OmPWhaltb0WpI7OV2oW7X5McrpcRW1xMU+ePm2tNpuZa+AvI5Z/QnKHja+U/herm+Fcs2pcEe6pkPRUmROzNqHC8ic5zePexbGSzXnP9dhw2uLwJRdn1rezZ2YHTGEhAqrakM6v54BQJzmxNb7njOnSaNNcN+mfB7aBZmHlU1HzELBKXYIsV2GPWlMWNQMk+GSuEv9vV94k3gvCAJFiIBoMPku5yr/QW5Mv5ec9bFgnsNBPiida2oFT3z0HPI2BtXTnouc7YrnfmmRIKB9ESmu7bOvC7uIC2Eg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none 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=+qZDYjlT0pmiGRKrun5kOMO5g3LAdxliTTbwYi8A4pQ=; b=NoYgtwxdZKrWCDDM/3irqZ3Ho5AAHPkUDMkF3eqTlUsHnPcgTOV3chQF+AI/EkybWyObXo2cLlI6GvhZS9cwQHoppl3AVOq37BUaFIA9n3KmwkfxelqisiU7KiSrP09hrNhxLMd27jncRZ3u3DNFlWvxTIudw8Zr+e388itrF9s= Authentication-Results-Original: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB4029.eurprd08.prod.outlook.com (2603:10a6:803:ec::14) by VI1PR08MB3392.eurprd08.prod.outlook.com (2603:10a6:803:7b::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.25; Mon, 20 Jul 2020 11:10:39 +0000 Received: from VI1PR08MB4029.eurprd08.prod.outlook.com ([fe80::b8ed:5041:249f:6770]) by VI1PR08MB4029.eurprd08.prod.outlook.com ([fe80::b8ed:5041:249f:6770%2]) with mapi id 15.20.3195.025; Mon, 20 Jul 2020 11:10:39 +0000 Date: Mon, 20 Jul 2020 12:10:36 +0100 From: Alex Coplan To: jit@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: dmalcolm@redhat.com, nd@arm.com Subject: [PATCH] jit: Fix random truncation of testsuite output Message-ID: <20200720111036.jnvu6qu3z4sbj2ns@arm.com> Content-Type: multipart/mixed; boundary="ylzgc2rypjzgyh3g" Content-Disposition: inline User-Agent: NeoMutt/20171215 X-ClientProxiedBy: LO2P265CA0311.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::35) To VI1PR08MB4029.eurprd08.prod.outlook.com (2603:10a6:803:ec::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.53) by LO2P265CA0311.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18 via Frontend Transport; Mon, 20 Jul 2020 11:10:38 +0000 X-Originating-IP: [217.140.106.53] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8729ed16-0f7c-43be-2bbf-08d82c9d8d19 X-MS-TrafficTypeDiagnostic: VI1PR08MB3392:|AM4PR08MB2898: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: C101cCvE5i2t98huMerSF/QCC1q2VGRlPtFtBL7rM5vImGCGCW7KrDrIqOGL+3dxWfhJGIGO5nXHstchlkszlKp7DnEl6/NLIHBB2E2tBVLBremvSY9h2n5Yu5snBwE/zjxD3n4CuWpXOBvDn73h+TvdKgAL8gjQABETbPkkhIy3y/I4/opfh2SMSTSsU1DczZAQRrOQDAGmNTWLkevei3Izgl6ey5Z69REAXjzunXfo55qiu7VkM35ctojgBEuUwXPIG5d+iO+7GlDf8dDd9SVddyxNQCXOPuLRP/NfGQTZ/BVK0wMOZz7Pv9kFK1w//kBV4as64EuipFfLMC8K/S0RvMXkxAts8Sv7pAWIJQhfvpSgp3E4MKfxgTOyrY6q5VjxCBXoa47A1g9gXFScFYXjT6lhUatdo3S6fWlCTgi70uUyKeKaaJhSJ5EGVeYmE7DkdZ6NQkIGMtX/JzCnUQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB4029.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(39860400002)(376002)(346002)(366004)(396003)(8886007)(186003)(2906002)(44832011)(16526019)(478600001)(86362001)(52116002)(4326008)(966005)(235185007)(26005)(5660300002)(7696005)(44144004)(33964004)(55016002)(8936002)(8676002)(956004)(2616005)(66946007)(36756003)(21480400003)(66476007)(66616009)(316002)(66556008)(1076003)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: DDhW4VvxE9P+vBvHDu1u8W3tUWGdz57TldzkIj0wnUtdws88UKiclMPHveviEcFqjl5Ea7ZyIyBVO5gPlxmvCc5ynkEkE1IytAhrWtqm2NMHlaLP4pVqGCKo+dAS0Z19SH3Xw88vcIbDCoz7QWfbLQ6afGG7lHCIDBl0nurOeHQYI8Bf3eA9h65DHAohcjvu3asWf2r7gSlpo59O9L/+vey2taGS8atN6fxwebESTXhzN9tkw1SaGQy/2RwBzvDSfkhLSLKYMD4utoYopZtTF8JkLEr4XuKJ2snj50OOIAhlxHL30uaBAewzMjQRZWuNNQiDTYtcVpAM7oQ9jHwtU3m8VHIPVX8PPYU6TCdOfSvgvlLYzIgYYb4T67HyyHR4mxpB+saqplhGZgm7NMZqpUt6VBtqJg8o3H62G9d6WzigpSAujU1vhqe+bNOK2UkcOFHyR+eaysNpUBUxLgS5aM6VyXGTLIx1pMkuU4cdx1/n/Pah7LXbbaQy3Exkfy3C X-MS-Exchange-Transport-Forked: True X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3392 Original-Authentication-Results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT007.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(376002)(136003)(346002)(396003)(46966005)(36756003)(5660300002)(55016002)(86362001)(2616005)(336012)(235185007)(1076003)(956004)(316002)(21480400003)(478600001)(44832011)(966005)(70586007)(70206006)(82740400003)(8676002)(66616009)(47076004)(26005)(8886007)(82310400002)(7696005)(450100002)(8936002)(81166007)(4326008)(186003)(33964004)(356005)(44144004)(16526019)(2906002)(2700100001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 9e810622-85e0-494c-1396-08d82c9d88ba X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /BOEsAIIqGCsZoGMsnB4jrtsxy5D8RPLnBmCrqwu2lI6FQqcDrcxOVh0zPcSabCz1XsXjWfCyYYm8pTHXX1ErKElPTrwtqBxltSFlocielGIoZl86GU5O+2eUII1li+896sJOntZmYaG08zw08yYsW2ZyjBqOWff9kALlHkiAUK5Fur39nm8mOdjNl41l467MnWUItFxKTdVnt5jssSTKfXhLbxyYrwEdpqAGyxLYvoZ8v9tioI+a8SJksgSb4N/GNcSfUXYo1KTL0P1TylF3rOoMIgNnQx4TxoPwWdN1nVte9ukJvOJjNS5Xvjq4tVkMtVP2LgYy0bQznkUgmTBKYgM6Jvk7qEBzU2SftNcK5lvSy+FQJeVc26zfw01G7H+pKyIvsfu4gaw4foD5j26NPk8/rmGLt5IMYe6Qhwol++cpjTX71fdF+M/vsDuAPJQ7ekNpOymTZGYY08PUxYDIaLeoDs7d1WWw9gE7zD3sgwDfBrYG+TnlCLOoYT2193z X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2020 11:10:46.1539 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8729ed16-0f7c-43be-2bbf-08d82c9d8d19 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR08MB2898 X-Spam-Status: No, score=-15.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: jit@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Jit mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2020 11:10:51 -0000 --ylzgc2rypjzgyh3g Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hello, This patch fixes a bug in jit.exp which causes the DejaGnu output of the libgccjit testsuite to be nondeterministically truncated. This bug was copied from DejaGnu's own implementation of the host_execute function. See the upstream bug report [0] where the maintainers point out that the regex patterns in host_execute should (but don't currently) explicitly match newlines to avoid relying on DejaGnu not reading more than one line of the output (which is not guaranteed). To reproduce the bug, run: $ make check-jit RUNTESTFLAGS="jit.exp=test-arith-overflow.c" $ grep -v iteration testsuite/jit/jit.sum and you should see some lines that have been truncated (I see the word iteration partially or fully truncated). Alternatively, simply run the testsuite twice (saving a copy of testsuite/jit/jit.sum from the first run) and diff the two jit.sum files to observe the random truncations to the output. This patch should make it easier to test jit patches in the future, since it makes it possible to reliably compare the output of two jit.sum files (as with the other tests in GCC). Testing: * Ran the testsuite before and after the patch, observing that the only differences in jit.sum were in test-threads.c (nondeterministic test) and where the truncated output from the first run was no longer truncated. * Ran the testsuite twice after the patch, observing that the only differences in jit.sum between the two runs were in test-threads.c. OK for master? Thanks, Alex --- 2020-07-20 Alex Coplan gcc/testsuite/ChangeLog: * jit.dg/jit.exp (fixed_host_execute): Fix regex patterns to always explicitly match newlines. [0] : https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42399 --ylzgc2rypjzgyh3g Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="patch.txt" diff --git a/gcc/testsuite/jit.dg/jit.exp b/gcc/testsuite/jit.dg/jit.exp index 2f54681713b..2d8c884b6b8 100644 --- a/gcc/testsuite/jit.dg/jit.exp +++ b/gcc/testsuite/jit.dg/jit.exp @@ -202,37 +202,37 @@ proc fixed_host_execute {args} { set timetol 0 exp_continue } - -re "^$prefix\tNOTE:${text}*" { + -re "^$prefix\tNOTE:\[^\r\n\]+\r\n" { regsub "\[\n\r\t\]*NOTE: $text\r\n" $expect_out(0,string) "" output - set output [string range $output 6 end] + set output [string range $output 6 end-2] verbose "$output" 2 set timetol 0 exp_continue } - -re "^$prefix\tPASSED:${text}*" { + -re "^$prefix\tPASSED:\[^\r\n\]+\r\n" { regsub "\[\n\r\t\]*PASSED: $text\r\n" $expect_out(0,string) "" output - set output [string range $output 8 end] + set output [string range $output 8 end-2] pass "$output" set timetol 0 exp_continue } - -re "^$prefix\tFAILED:${text}*" { + -re "^$prefix\tFAILED:\[^\r\n\]+\r\n" { regsub "\[\n\r\t\]*FAILED: $text\r\n" $expect_out(0,string) "" output - set output [string range $output 8 end] + set output [string range $output 8 end-2] fail "$output" set timetol 0 exp_continue } - -re "^$prefix\tUNTESTED:${text}*" { + -re "^$prefix\tUNTESTED:\[^\r\n\]+\r\n" { regsub "\[\n\r\t\]*TESTED: $text\r\n" $expect_out(0,string) "" output - set output [string range $output 8 end] + set output [string range $output 8 end-2] untested "$output" set timetol 0 exp_continue } - -re "^$prefix\tUNRESOLVED:${text}*" { + -re "^$prefix\tUNRESOLVED:\[^\r\n\]+\r\n" { regsub "\[\n\r\t\]*UNRESOLVED: $text\r\n" $expect_out(0,string) "" output - set output [string range $output 8 end] + set output [string range $output 8 end-2] unresolved "$output" set timetol 0 exp_continue --ylzgc2rypjzgyh3g--