From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id A197F3858018 for ; Wed, 6 Oct 2021 08:57:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A197F3858018 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wr1-x430.google.com with SMTP id o20so6548213wro.3 for ; Wed, 06 Oct 2021 01:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=PDcrg3e3eoG/RyoRc80mqogPzVKMryOHet7UxOV+/Yo=; b=ad8NaiauPiJ1mvTDoX9NOBZsWGY3XAvTtK6t0xyFOE/WtcpqiCxHzpg8XMFEsDhi2w vm+5EeYnUs4JL0YQmks6UGduCmjBLiYvmdP5s8RPZNFQhxSl1gUPAJca6WZYnKsO7wbc J5bTBbG2kTHDh2ZXU2TJ/MBOR2f/6exTq2O2kJ1i0r4kbYW41UAzJt1hBVILZcFvvMyi 3jc5OVVGMg06lVI6gixiH7oDfJVcZLM95T9zweXozhXLE0MIARgHGqn2mC/y3QgA1sRb y9L/85cfSgeklhKIgm+rVGd19uEfAxNtAvxsJ6NrXh6Tn++WUlzffVxhzN8PX1HSayiR Cn/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PDcrg3e3eoG/RyoRc80mqogPzVKMryOHet7UxOV+/Yo=; b=JeUJjo9a8LQ3w0QCVtwuE3YzgSeDwMSufbwEOt3Y7b6lYpGkDu6+vOntX206Qu30Nn 9ww6WP+iodI3VCf3pfReTQ6q968WD4lDxKFxJOaFo13nFozLZXZu3nGvqr2+TbLS2i0v VyGDP2GP5rTHwUBfJj0hI7Ftpnvdq1+c4ag+VMIkGFyhF973OZsamNPVMDKjSWWjc5Gx U43vp9Gk7eu45/EIZoVTdbDAkmePk3ClMuQnfEk4Wp2CyOQA8xR1nXQkz6us8x17R3bb Xy0qY4e8NLUoGRrTPj+tnRvdTb69cE31ZeO0zWqKPN07ICPo1vJIP4aXJ/uOKnND+wJp iwOg== X-Gm-Message-State: AOAM532g/efb8q/37POi9SoPz5pqThiaLdBYOMr1ll5zgFjpJzZkoqZh 78ab1/ccgj+vmAolGg8BcoYlnYSNz6fz1Q== X-Google-Smtp-Source: ABdhPJyA8hsakOsqioKtXmRLTBGbmvjNoC9sKNtbHspLn5phz9VQJtylWdoFIFA0rKWKyMka/4T2kQ== X-Received: by 2002:a5d:6d06:: with SMTP id e6mr27037697wrq.86.1633510662762; Wed, 06 Oct 2021 01:57:42 -0700 (PDT) Received: from localhost (host86-169-137-11.range86-169.btcentralplus.com. [86.169.137.11]) by smtp.gmail.com with ESMTPSA id o12sm930021wrw.73.2021.10.06.01.57.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 01:57:42 -0700 (PDT) Date: Wed, 6 Oct 2021 09:57:40 +0100 From: Andrew Burgess To: Tom de Vries Cc: gdb-patches@sourceware.org, Tom Tromey Subject: Re: [PATCH][gdb/testsuite] Fix FAIL in gdb.tui/corefile-run.exp Message-ID: <20211006085740.GQ1900093@embecosm.com> References: <20211005114212.GA2804@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211005114212.GA2804@delia> X-Operating-System: Linux/5.8.18-100.fc31.x86_64 (x86_64) X-Uptime: 09:57:27 up 17 days, 6 min, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 06 Oct 2021 08:57:45 -0000 * Tom de Vries via Gdb-patches [2021-10-05 13:42:14 +0200]: > 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? LGTM. Thanks, Andrew > > 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" > } > } >