From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 9A9683858D32 for ; Tue, 13 Jun 2023 11:21:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9A9683858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de 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-out1.suse.de (Postfix) with ESMTPS id BBCF1223E3 for ; Tue, 13 Jun 2023 11:21:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1686655267; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=n/pifDbFFHR/wiv27ZL2iHCRWvCiVt2GIhLL1IaTB/I=; b=igBVFgqPJTpHuyJxZZndUMrwNY6sl6YyNYZ4dZXD60hTxSIW4mbHCgqv9J9SIpF1aPT5Uv aKK3k2tBekmRcefNZVKYNKEbWFBMG15sb+Jpd4gx2O+dim/hBO8XWRyAcWThBTH8pfpD0N Y5rNyTndNl5GKz2n9KtV1dH3VRpxPAY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1686655267; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=n/pifDbFFHR/wiv27ZL2iHCRWvCiVt2GIhLL1IaTB/I=; b=pEO7Bt6Yu824QmeSA02yvpj2ocuS3sFC8E68IR65jQqutkgxcJICz8c6uzsNV8w80QOUO0 1tFSJ6blWpscZ4AA== 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 A8CC213483 for ; Tue, 13 Jun 2023 11:21:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Iwz+JyNRiGTVDwAAMHmgww (envelope-from ) for ; Tue, 13 Jun 2023 11:21:07 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Fix gdb.tui/long-prompt.exp with read1 Date: Tue, 13 Jun 2023 13:21:27 +0200 Message-Id: <20230613112127.17413-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: When running test-case gdb.tui/long-prompt.exp with check-read1, we get: ... (gdb) FAIL: gdb.tui/long-prompt.exp: prompt size == width + 1: \ end of screen: at last line ... The problem is in these commands: ... Term::command "echo \\n" Term::command "echo \\n" Term::command "echo \\n" Term::command "echo \\n" ... The last one makes the terminal scroll, and the scrolling makes the expected output match on a different line. Fix this by replacing the sequence with a single command: ... Term::command "echo \\n\\n\\n\\n\\n\\n" ... which avoids scrolling. Tested on x86_64-linux. --- gdb/testsuite/gdb.tui/long-prompt.exp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.tui/long-prompt.exp b/gdb/testsuite/gdb.tui/long-prompt.exp index e7249bbfea3..e4e8b75ede0 100644 --- a/gdb/testsuite/gdb.tui/long-prompt.exp +++ b/gdb/testsuite/gdb.tui/long-prompt.exp @@ -57,10 +57,7 @@ with_test_prefix "prompt size == width + 1: end of screen" { } # Put prompt at last line. - Term::command "echo \\n" - Term::command "echo \\n" - Term::command "echo \\n" - Term::command "echo \\n" + Term::command "echo \\n\\n\\n\\n\\n\\n" gdb_assert { $Term::_cur_row == 23 } "at last line" set prompt "123456789A123456789B123456789C123456789D>" base-commit: 3e543c18b174a6d68277d27f27a98eb9515d20c5 -- 2.35.3