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 193DC38930D0 for ; Wed, 29 Apr 2020 11:22:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 193DC38930D0 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 6E530AE87 for ; Wed, 29 Apr 2020 11:22:45 +0000 (UTC) Date: Wed, 29 Apr 2020 13:22:44 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Add xfails for PR gcc/90232 Message-ID: <20200429112243.GA5094@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=-28.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, KAM_NUMSUBJECT, 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, 29 Apr 2020 11:23:05 -0000 Hi, With target board debug-types, we have these FAILs: ... FAIL: gdb.guile/scm-symtab.exp: test simple_struct in static symbols FAIL: gdb.python/py-symtab.exp: test simple_struct in static symbols ... due to PR gcc/90232, as explained in commit 15cd93d05e8 "[gdb/symtab] Handle struct decl with DW_AT_signature". Marks these as XFAILs. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Add xfails for PR gcc/90232 gdb/testsuite/ChangeLog: 2020-04-29 Tom de Vries * lib/gdb.exp (debug_types): New proc. * gdb.guile/scm-symtab.exp: Add xfail for PR gcc/90232. * gdb.python/py-symtab.exp: Same. --- gdb/testsuite/gdb.guile/scm-symtab.exp | 19 +++++++++++++++++-- gdb/testsuite/gdb.python/py-symtab.exp | 17 ++++++++++++++++- gdb/testsuite/lib/gdb.exp | 18 ++++++++++++++++++ 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.guile/scm-symtab.exp b/gdb/testsuite/gdb.guile/scm-symtab.exp index 4b8c15566ed..b6d5a719437 100644 --- a/gdb/testsuite/gdb.guile/scm-symtab.exp +++ b/gdb/testsuite/gdb.guile/scm-symtab.exp @@ -32,6 +32,8 @@ if ![gdb_guile_runto_main] { return } +set debug_types [debug_types] + # Setup and get the symbol table. set line_no [gdb_get_line_number "Block break here."] gdb_breakpoint $line_no @@ -101,8 +103,21 @@ gdb_test "guile (print (->bool (member \"int\" static-symbols)))" \ "#t" "test int in static symbols" gdb_test "guile (print (->bool (member \"char\" static-symbols)))" \ "#t" "test char in static symbols" -gdb_test "guile (print (->bool (member \"simple_struct\" static-symbols)))" \ - "#t" "test simple_struct in static symbols" +gdb_test_multiple \ + "guile (print (->bool (member \"simple_struct\" static-symbols)))" \ + "test simple_struct in static symbols" { + -re -wrap "#t" { + pass $gdb_test_name + } + -re -wrap "#f" { + if { $debug_types } { + # Xfail for PR gcc/90232. + xfail $gdb_test_name + } else { + fail $gdb_test_name + } + } + } # Test is_valid when the objfile is unloaded. This must be the last # test as it unloads the object file in GDB. diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp index 836cfd23675..a0fe885bdfc 100644 --- a/gdb/testsuite/gdb.python/py-symtab.exp +++ b/gdb/testsuite/gdb.python/py-symtab.exp @@ -32,6 +32,8 @@ if ![runto_main] then { return 0 } +set debug_types [debug_types] + global hex decimal # Setup and get the symbol table. @@ -75,7 +77,20 @@ gdb_test "python print (\"func\" in global_symbols)" "True" "test func in global gdb_test "python print (\"main\" in global_symbols)" "True" "test main in global symbols" gdb_test "python print (\"int\" in static_symbols)" "True" "test int in static symbols" gdb_test "python print (\"char\" in static_symbols)" "True" "test char in static symbols" -gdb_test "python print (\"simple_struct\" in static_symbols)" "True" "test simple_struct in static symbols" +gdb_test_multiple "python print (\"simple_struct\" in static_symbols)" \ + "test simple_struct in static symbols" { + -re -wrap "True" { + pass $gdb_test_name + } + -re -wrap "False" { + if { $debug_types } { + # Xfail for PR gcc/90232. + xfail $gdb_test_name + } else { + fail $gdb_test_name + } + } + } # Test is_valid when the objfile is unloaded. This must be the last # test as it unloads the object file in GDB. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 2208f3a1a9b..b72ce0cda7f 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -7106,5 +7106,23 @@ proc ensure_gdb_index { binfile } { return -1 } +# Return 1 if executable contains .debug_types section. Otherwise, return 0. + +proc debug_types { } { + global hex + + set cmd "maint info sections" + gdb_test_multiple $cmd "" { + -re -wrap "at $hex: .debug_types.*" { + return 1 + } + -re -wrap "" { + return 0 + } + } + + return 0 +} + # Always load compatibility stuff. load_lib future.exp