From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id D79C2385BF81 for ; Wed, 8 Apr 2020 05:00:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D79C2385BF81 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 427D3AB5F; Wed, 8 Apr 2020 05:00:15 +0000 (UTC) Date: Wed, 8 Apr 2020 07:00:13 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Cc: Tom Tromey , Pedro Alves Subject: [committed][gdb/testsuite] Add gcc/94469 xfails to gdb.ada/call_pn.exp Message-ID: <20200408050012.GA25052@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-31.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2020 05:00:19 -0000 Hi, When running test-case gdb.ada/call_pn.exp with target board unix/-flto/-O0/-flto-partition=none/-ffat-lto-objects, we run into: ... (gdb) print last_node_id^M Multiple matches for last_node_id^M [0] cancel^M [1] pck.last_node_id at gdb/testsuite/gdb.ada/call_pn/pck.adb:17^M [2] pck.last_node_id at gdb/testsuite/gdb.ada/call_pn/foo.adb:17^M > FAIL: gdb.ada/call_pn.exp: print last_node_id after calling pn (timeout) ... This failure is due to a gcc bug that declares two instead of one symbols, filed as PR gcc/94469. Add an xfail at this test. Also add a similar xfail at an earlier test, that only triggers with -readnow. Stabilize test results by making sure the earlier xfail is always triggered, using "maint expand-symtabs". Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Add gcc/94469 xfails to gdb.ada/call_pn.exp gdb/testsuite/ChangeLog: 2020-04-08 Tom de Vries PR testsuite/25760 * gdb.ada/call_pn.exp: Call "maint expand-symtabs". Add xfails. --- gdb/testsuite/gdb.ada/call_pn.exp | 50 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.ada/call_pn.exp b/gdb/testsuite/gdb.ada/call_pn.exp index b21de4da7c..1fe133fe7b 100644 --- a/gdb/testsuite/gdb.ada/call_pn.exp +++ b/gdb/testsuite/gdb.ada/call_pn.exp @@ -29,8 +29,41 @@ if ![runto "foo.adb:$bp_location" ] then { return } +# The xfail mentioned below triggers for the "after" print, but may not +# trigger for the "before" print, though it will for -readnow. This is +# related to PR25764 - "LOC_UNRESOLVED symbol missing from partial symtab". +# Stabilize test results by ensuring that the xfail triggers for the "before" +# print. +gdb_test_no_output "maint expand-symtabs" + +# The xfail is for PR gcc/94469, which occurs with target board +# unix/-flto/-O0/-flto-partition=none/-ffat-lto-objects and gcc-8 and later. +# Note: We don't check for the filename in xfail_re because it might be +# wrong, filed as gdb PR25771. +set xfail_re \ + [multi_line \ + "Multiple matches for last_node_id" \ + "\\\[0\\\] cancel" \ + "\\\[1\\\] pck\.last_node_id at .*.adb:17" \ + "\\\[2\\\] pck\.last_node_id at .*.adb:17" \ + "> $"] + # Make sure that last_node_id is set to zero... -gdb_test "print last_node_id" "= 0" "print last_node_id before calling pn" +gdb_test_multiple "print last_node_id" "print last_node_id before calling pn" { + -re $xfail_re { + xfail $gdb_test_name + # One of the choices will print the correct value, the other one + # . Since we don't known which one to choose to get + # the correct value, cancel. + gdb_test_multiple "0" "cancel after xfail 1" { + -re -wrap "cancelled" { + } + } + } + -re -wrap "= 0" { + pass $gdb_test_name + } +} # Now, call procedure Pn, which should set Last_Node_Id to the value # of the parameter used in the function call. Verify that we can print @@ -38,5 +71,16 @@ gdb_test "print last_node_id" "= 0" "print last_node_id before calling pn" gdb_test "print pn (4321)" "= 4321" # Make sure that last_node_id now has the correct value... -gdb_test "print last_node_id" "= 4321" "print last_node_id after calling pn" - +gdb_test_multiple "print last_node_id" "print last_node_id after calling pn" { + -re $xfail_re { + xfail $gdb_test_name + # Cancel + gdb_test_multiple "0" "cancel after xfail 2" { + -re -wrap "cancelled" { + } + } + } + -re -wrap "= 4321" { + pass $gdb_test_name + } +}