From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id AGaHOsDPmV96bwAAWB0awg (envelope-from ) for ; Wed, 28 Oct 2020 16:08:32 -0400 Received: by simark.ca (Postfix, from userid 112) id EDB511EFC1; Wed, 28 Oct 2020 16:08:32 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 4AFDF1E590 for ; Wed, 28 Oct 2020 16:08:32 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F2A003858001; Wed, 28 Oct 2020 20:08:31 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id B86E9385EC58 for ; Wed, 28 Oct 2020 20:08:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B86E9385EC58 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.221.27]) by mx2.suse.de (Postfix) with ESMTP id CF67AADD2 for ; Wed, 28 Oct 2020 20:08:28 +0000 (UTC) Date: Wed, 28 Oct 2020 21:08:27 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.python/py-symbol.exp with -readnow Message-ID: <20201028200826.GA27923@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-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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Hi, When running test-case gdb.python/py-symbol.exp with target board readnow, we get: ... FAIL: gdb.python/py-symbol.exp: print line number of rr FAIL: gdb.python/py-symbol.exp: print value of rr ... These are FAILs due to PR25857. Mark these FAILs as KFAILs. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.python/py-symbol.exp with -readnow gdb/testsuite/ChangeLog: 2020-10-28 Tom de Vries * gdb.python/py-symbol.exp: Add KFAILs for -readnow. --- gdb/testsuite/gdb.python/py-symbol.exp | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp index caa7ddc800..152a9173d2 100644 --- a/gdb/testsuite/gdb.python/py-symbol.exp +++ b/gdb/testsuite/gdb.python/py-symbol.exp @@ -29,6 +29,8 @@ if {[prepare_for_testing "failed to prepare" $testfile \ # Skip all tests if Python scripting is not enabled. if { [skip_python_tests] } { continue } +set readnow_p [readnow] + # Check that we find all static symbols before the inferior has # started, at which point some of the symtabs might not have been # expanded. @@ -61,14 +63,36 @@ gdb_test "python print (gdb.lookup_global_symbol('qq').needs_frame)" \ # Similarly, test looking up a static symbol before we runto_main. set rr_line [gdb_get_line_number "line of rr"] +set rr_line_alt [gdb_get_line_number "line of other rr" py-symbol-2.c] gdb_test "python print (gdb.lookup_global_symbol ('rr') is None)" "True" \ "lookup_global_symbol for static var" -gdb_test "python print (gdb.lookup_static_symbol ('rr').line)" "$rr_line" \ - "print line number of rr" +set cmd "python print (gdb.lookup_static_symbol ('rr').line)" +gdb_test_multiple $cmd "print line number of rr" { + -re -wrap "$rr_line" { + pass $gdb_test_name + } + -re -wrap "$rr_line_alt" { + if { $readnow_p } { + setup_kfail "symtab/25857" *-*-* + } + fail $gdb_test_name + } +} -gdb_test "python print (gdb.lookup_static_symbol ('rr').value ())" "42" \ - "print value of rr" +set cmd "python print (gdb.lookup_static_symbol ('rr').value ())" +gdb_test_multiple $cmd "print value of rr" { + -re -wrap "42" { + pass $gdb_test_name + } + -re -wrap "99" { + if { $readnow_p } { + setup_kfail "symtab/25857" *-*-* + } + fail $gdb_test_name + } +} + gdb_test "python print (gdb.lookup_static_symbol ('rr').needs_frame)" \ "False" \