From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id VHwfH4eQll9UGAAAWB0awg (envelope-from ) for ; Mon, 26 Oct 2020 05:01:59 -0400 Received: by simark.ca (Postfix, from userid 112) id 721EE1F08D; Mon, 26 Oct 2020 05:01:59 -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 A13911E590 for ; Mon, 26 Oct 2020 05:01:58 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E3C363846075; Mon, 26 Oct 2020 09:01:57 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 08A9B3857C73 for ; Mon, 26 Oct 2020 09:01:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 08A9B3857C73 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 1EE39B23E; Mon, 26 Oct 2020 09:01:55 +0000 (UTC) Date: Mon, 26 Oct 2020 10:01:40 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH][gdb/testsuite] Prevent pagination in GDB_INTERNALFLAGS Message-ID: <20201026090134.GA27913@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.base/corefile.exp with target board readnow, we run into: ... Reading symbols from outputs/gdb.base/corefile/corefile...^M Expanding full symbols from outputs/gdb.base/corefile/corefile...^M [New LWP 2293]^M Core was generated by `outputs/gdb.base/corefile/co'.^M Program terminated with signal SIGABRT, Aborted.^M --Type for more, q to quit, c to continue without paging--\ FAIL: gdb.base/corefile.exp: (timeout) starting with -core ... In commit bd447abb24 "Make gdb.base/corefile.exp work on terminals with few rows", pagination (in the same test-case) is prevented using: ... set stty_init "rows 25 cols 80" ... but this doesn't work in our case because using -readnow adds an extra line "Expanding full symbols". The test passes when increasing rows to 26. However, increasing the rows by some n only fixes the problem for n lines, and things will break again if somehow we end up with n + 1 lines. Instead, fix this by setting heigth and width in INTERNAL_GDBFLAGS. This solution was not chosen in commit bd447abb24 because it doesn't handle pagination due to the introduction text. But it does handle the pagination due to the extra "Expanding full symbols", and any other line printed during and after file loading. Tested on x86_64-linux, with and without readnow. With -readnow, fixes these FAILs: ... FAIL: gdb.base/corefile.exp: (timeout) starting with -core FAIL: gdb.base/reread-readsym.exp: source reread-readsym.gdb 1 (timeout) ... Any comments? Thanks, - Tom [gdb/testsuite] Prevent pagination in GDB_INTERNALFLAGS gdb/testsuite/ChangeLog: 2020-10-26 Tom de Vries * lib/gdb.exp (INTERNAL_GDBFLAGS): Set heigth and width. --- gdb/testsuite/lib/gdb.exp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index f53df59f18..197542eec3 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -124,7 +124,13 @@ set BUILD_DATA_DIRECTORY "[pwd]/../data-directory" # INTERNAL_GDBFLAGS contains flags that the testsuite requires. global INTERNAL_GDBFLAGS if ![info exists INTERNAL_GDBFLAGS] { - set INTERNAL_GDBFLAGS "-nw -nx -data-directory $BUILD_DATA_DIRECTORY" + set INTERNAL_GDBFLAGS \ + [join [list \ + "-nw" \ + "-nx" \ + "-data-directory $BUILD_DATA_DIRECTORY" \ + {-iex "set height 0"} \ + {-iex "set width 0"}]] } # The variable gdb_prompt is a regexp which matches the gdb prompt.