From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id JWx+HCw6XGHeFgAAWB0awg (envelope-from ) for ; Tue, 05 Oct 2021 07:42:36 -0400 Received: by simark.ca (Postfix, from userid 112) id 647151EE1B; Tue, 5 Oct 2021 07:42:36 -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.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 995061E79C for ; Tue, 5 Oct 2021 07:42:35 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 180B83857416 for ; Tue, 5 Oct 2021 11:42:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 180B83857416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1633434155; bh=Q1dNSaPVYSB/mvNwEmpw33ZGPtRN1nk+hFz+/8bwzOI=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=tBhHULfHNHyilMKRHrj56VP72/ZORlFfjs7jini44NU5cIBzexp7WGWUixH/beiTW CwFVzYnp2wd04chDgctZZMwids0AoDj415ppn9Fpj3q3vwtpBkxsjtVJccrYoggFRy YL3dZgkCDVTXxYfTquzle+g/WEN5XCX5GOcnDgDI= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id DB36A385840B for ; Tue, 5 Oct 2021 11:42:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DB36A385840B Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 15DD320015; Tue, 5 Oct 2021 11:42:16 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id F3CCF13C28; Tue, 5 Oct 2021 11:42:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id o7R2Ohc6XGF7RAAAMHmgww (envelope-from ); Tue, 05 Oct 2021 11:42:15 +0000 Date: Tue, 5 Oct 2021 13:42:14 +0200 To: gdb-patches@sourceware.org Subject: [PATCH][gdb/testsuite] Fix FAIL in gdb.tui/corefile-run.exp Message-ID: <20211005114212.GA2804@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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Cc: Tom Tromey Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, When running test-case gdb.tui/corefile-run.exp on openSUSE Tumbleweed, I run into: ... PASS: gdb.tui/corefile-run.exp: load corefile FAIL: gdb.tui/corefile-run.exp: run until the end ... What's going on is easier to see when also doing dump_screen if check_contents passes, and inspecting state at the preceding PASS: ... +-------------------------------------------------------------------------+ exec No process In: L?? PC: ?? [New LWP 16629] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `/data/gdb_versions/devel/build/gdb/testsuite/output s/gdb.tui/corefile-run/corefi'. Program terminated with signal SIGTRAP, Trace/breakpoint trap. #0 main () --Type for more, q to quit, c to continue without paging-- ... The problem is that we're getting a pagination prompt, and the subsequent run command is interpreted as an answer to that prompt. Fix this by: - detecting the gdb prompt in response to "load corefile", such that we detect the failure earlier, and - doing a "set pagination off" in Term::clean_restart. Tested on x86_64-linux. Any comments? Thanks, - Tom [gdb/testsuite] Fix FAIL in gdb.tui/corefile-run.exp --- gdb/testsuite/gdb.tui/corefile-run.exp | 2 +- gdb/testsuite/lib/tuiterm.exp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.tui/corefile-run.exp b/gdb/testsuite/gdb.tui/corefile-run.exp index f000ff6a93a..d3eaaaf4af9 100644 --- a/gdb/testsuite/gdb.tui/corefile-run.exp +++ b/gdb/testsuite/gdb.tui/corefile-run.exp @@ -54,7 +54,7 @@ gdb_assert {![string match "No Source Available" $text]} \ "initial source listing" Term::command "core-file $core" -Term::check_contents "load corefile" "21 *return 0" +Term::check_contents "load corefile" "21 *return 0.*$gdb_prompt .*" Term::command "run" Term::check_contents "run until the end" \ diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp index 222583f291f..ad5cbb72ea5 100644 --- a/gdb/testsuite/lib/tuiterm.exp +++ b/gdb/testsuite/lib/tuiterm.exp @@ -595,6 +595,7 @@ namespace eval Term { } else { ::clean_restart $executable } + ::gdb_test_no_output "set pagination off" } }