From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wL6vMIHBZWSGSQ0AWB0awg (envelope-from ) for ; Thu, 18 May 2023 02:11:13 -0400 Received: by simark.ca (Postfix, from userid 112) id C4DBA1E11E; Thu, 18 May 2023 02:11:13 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=N+OYbbzv; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 481E11E0D6 for ; Thu, 18 May 2023 02:11:13 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 87DE738560AA for ; Thu, 18 May 2023 06:11:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87DE738560AA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684390272; bh=aMOb4tsVq0bVnILlyY3beV4M741WFvsw6tWADMbamgk=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=N+OYbbzv0N1IGh4E1iVrgRheqgQvtYSIU20en0Flt3snCYZSJX4APlhxWq9klwFkt Lvr8OXPI5JRyI8IrVK4WnDYcg3yfE2U5u3qGrWIGnHuDMaWBRqzMlNo5upuuLKiQvk 4lxKgenMNErnLJf055c13TeryzG8WbBr227n9YZg= Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 34A993858434 for ; Thu, 18 May 2023 06:10:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 34A993858434 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 C035D1FD63; Thu, 18 May 2023 06:10:50 +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 A16391390B; Thu, 18 May 2023 06:10:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 06U5JmrBZWRhfgAAMHmgww (envelope-from ); Thu, 18 May 2023 06:10:50 +0000 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH] [gdb/testsuite] Fix gdb.tui/wrap-line.exp Date: Thu, 18 May 2023 08:10:46 +0200 Message-Id: <20230518061046.17837-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" PR testsuite/30458 reports the following FAIL: ... PASS: gdb.tui/wrap-line.exp: width-auto-detected: cli: wrap ^CQuit (gdb) WARNING: timeout in accept_gdb_output Screen Dump (size 50 columns x 24 rows, cursor at column 6, row 3): 0 Quit 1 (gdb) 7890123456789012345678901234567890123456789 2 W^CQuit 3 (gdb) ... FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap ... The problem is that the regexp doesn't account for the ^C: ... gdb_assert { [Term::wait_for "^WQuit"] } "prompt after wrap" ... Fix this by updating the regexp, and likewise in another place in the test-case where we use ^C. Tested on x86_64-linux. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30458 --- gdb/testsuite/gdb.tui/wrap-line.exp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.tui/wrap-line.exp b/gdb/testsuite/gdb.tui/wrap-line.exp index 4587517504c..2bfe342e04d 100644 --- a/gdb/testsuite/gdb.tui/wrap-line.exp +++ b/gdb/testsuite/gdb.tui/wrap-line.exp @@ -25,6 +25,8 @@ set cols 50 set lines 24 set dims [list $lines $cols] +set re_control_c "(\\^C)?Quit" + # Fill line, assuming we start after the gdb prompt. proc fill_line { width } { set res "" @@ -47,7 +49,7 @@ proc fill_line { width } { proc test_wrap { wrap_width } { # Generate a prompt and parse it. send_gdb "\003" - gdb_assert { [Term::wait_for "(^|$::gdb_prompt )Quit"] } "start line" + gdb_assert { [Term::wait_for "(^|$::gdb_prompt )$::re_control_c"] } "start line" # Fill the line to just before wrapping. set str [fill_line $wrap_width] @@ -64,7 +66,7 @@ proc test_wrap { wrap_width } { # Generate a prompt and parse it. send_gdb "\003" - gdb_assert { [Term::wait_for "^WQuit"] } "prompt after wrap" + gdb_assert { [Term::wait_for "^W$::re_control_c"] } "prompt after wrap" } # Test wrapping in both CLI and TUI. base-commit: 0cc8cc5e6f82b8d3d8e3803c6f7f5e63f0c866ad -- 2.35.3