From patchwork Thu May 18 23:45:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 20499 Received: (qmail 18388 invoked by alias); 18 May 2017 23:45:33 -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 18262 invoked by uid 89); 18 May 2017 23:45:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=*box, Box, expecting X-HELO: outbound-ss-1812.hostmonster.com Received: from gproxy1-pub.mail.unifiedlayer.com (HELO outbound-ss-1812.hostmonster.com) (69.89.25.95) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 May 2017 23:45:21 +0000 Received: from cmgw3 (cmgw4 [10.0.90.84]) by gproxy1.mail.unifiedlayer.com (Postfix) with ESMTP id CF71D175A35 for ; Thu, 18 May 2017 17:45:21 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by cmgw3 with id MzlJ1v00J2f2jeq01zlMpR; Thu, 18 May 2017 17:45:21 -0600 X-Authority-Analysis: v=2.2 cv=VKStp5HX c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=tJ8p9aeEuA8A:10 a=zstS-IiYAAAA:8 a=7CQSdrXTAAAA:8 a=yYGkijx7tuEHj5fvEjgA:9 a=4G6NA9xxw8l3yy4pmD5M:22 a=a-qgeE7W1pNrGK8U0ZQC:22 Received: from 174-29-43-217.hlrn.qwest.net ([174.29.43.217]:49284 helo=bapiya.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1dBV6c-0002Dc-9c; Thu, 18 May 2017 17:45:18 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [FYI] Fix test failure with Rust 1.18 and 1.19 Date: Thu, 18 May 2017 17:45:15 -0600 Message-Id: <20170518234515.31705-1-tom@tromey.com> X-BWhitelist: no X-Exim-ID: 1dBV6c-0002Dc-9c X-Source-Sender: 174-29-43-217.hlrn.qwest.net (bapiya.Home) [174.29.43.217]:49284 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== With Rust 1.18 and 1.19, I saw some test suite failures. They were all of the same form -- Box seems to be qualified in the output now, like: print box_some $64 = core::option::Option>::Some(0x7ffff6c21018 "\001\000") ... where the test was expecting Option>. This patch fixes the problem in a way that should work with earlier versions of Rust. gdb/testsuite/ChangeLog 2017-05-18 Tom Tromey * gdb.rust/simple.exp: Allow Box to be qualified. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.rust/simple.exp | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 40df91e..a3a75bc 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2017-05-18 Tom Tromey + + * gdb.rust/simple.exp: Allow Box to be qualified. + 2017-05-18 Thomas Preud'homme * gdb.base/float.exp: Expect GDB prompt for targets without FPU. diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp index 0bcc83e..872b22c 100644 --- a/gdb/testsuite/gdb.rust/simple.exp +++ b/gdb/testsuite/gdb.rust/simple.exp @@ -198,8 +198,8 @@ gdb_test "print str_some" \ gdb_test "print str_none" " = core::option::Option::None" gdb_test "print int_some" " = core::option::Option::Some\\(1\\)" gdb_test "print int_none" " = core::option::Option::None" -gdb_test "print box_some" " = core::option::Option>::Some\\(.*\\)" -gdb_test "print box_none" " = core::option::Option>::None" +gdb_test "print box_some" " = core::option::Option<\[a-z:\]*Box>::Some\\(.*\\)" +gdb_test "print box_none" " = core::option::Option<\[a-z:\]*Box>::None" gdb_test "print custom_some" \ " = simple::NonZeroOptimized::Value\\(collections::string::String .*" gdb_test "print custom_none" " = simple::NonZeroOptimized::Empty" @@ -241,8 +241,8 @@ gdb_test "print (1)" " = 1" gdb_test "print 23..97.0" "Range expression with different types" gdb_test "print (*parametrized.next.val)" \ - " = simple::ParametrizedStruct {next: simple::ParametrizedEnum>>::Empty, value: 1}" + " = simple::ParametrizedStruct {next: simple::ParametrizedEnum<\[a-z:\]*Box>>::Empty, value: 1}" gdb_test "print parametrized.next.val" \ " = \\(simple::ParametrizedStruct \\*\\) $hex" gdb_test "print parametrized" \ - " = simple::ParametrizedStruct \\{next: simple::ParametrizedEnum>>::Val\\{val: $hex\\}, value: 0\\}" + " = simple::ParametrizedStruct \\{next: simple::ParametrizedEnum<\[a-z:\]*Box>>::Val\\{val: $hex\\}, value: 0\\}"