From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CG7FD6PPmV96bwAAWB0awg (envelope-from ) for ; Wed, 28 Oct 2020 16:08:03 -0400 Received: by simark.ca (Postfix, from userid 112) id 3E7A11EFC1; Wed, 28 Oct 2020 16:08:03 -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 B77A41E590 for ; Wed, 28 Oct 2020 16:08:02 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6C4863858001; Wed, 28 Oct 2020 20:08:02 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id F28EE3858001 for ; Wed, 28 Oct 2020 20:08:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F28EE3858001 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 15EAFADD2 for ; Wed, 28 Oct 2020 20:08:00 +0000 (UTC) Date: Wed, 28 Oct 2020 21:07:58 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.rust/traits.exp with -readnow Message-ID: <20201028200757.GA27867@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, With test-case gdb.rust/traits.exp and target board readnow we get: ... FAIL: gdb.rust/traits.exp: print *td FAIL: gdb.rust/traits.exp: print *tu ... Mark these FAILs as KFAILs. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.rust/traits.exp with -readnow gdb/testsuite/ChangeLog: 2020-10-28 Tom de Vries * lib/gdb.exp (readnow): Handle arg. * gdb.rust/traits.exp: Add KFAILs for -readnow. --- gdb/testsuite/gdb.rust/traits.exp | 8 ++++++++ gdb/testsuite/lib/gdb.exp | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.rust/traits.exp b/gdb/testsuite/gdb.rust/traits.exp index 41e58e1fef..d237b92872 100644 --- a/gdb/testsuite/gdb.rust/traits.exp +++ b/gdb/testsuite/gdb.rust/traits.exp @@ -43,5 +43,13 @@ if {![runto ${srcfile}:$line]} { return -1 } +set readnow_p [readnow $binfile] + +if { $readnow_p } { + setup_kfail "gdb/26799" *-*-* +} gdb_test "print *td" " = 23.5" +if { $readnow_p } { + setup_kfail "gdb/26799" *-*-* +} gdb_test "print *tu" " = 23" diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index ef96209b0d..003bd3069e 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -7318,8 +7318,13 @@ gdb_caching_proc supports_fcf_protection { # Return 1 if symbols were read in using -readnow. Otherwise, return 0. -proc readnow { } { - set cmd "maint print objfiles" +proc readnow { args } { + if { [llength $args] == 1 } { + set re [lindex $args 0] + } else { + set re "" + } + set cmd "maint print objfiles $re" gdb_test_multiple $cmd "" { -re -wrap "\r\n.gdb_index: faked for \"readnow\"\r\n.*" { return 1