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 3D1CA3858CDA for ; Thu, 13 Apr 2023 14:08:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3D1CA3858CDA 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 648AF218E1; Thu, 13 Apr 2023 14:08:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1681394896; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9wqUTjU52GZEJMgfY606YlmSUxRDZN+wxHtKtGPO2vE=; b=iadUjt+hHa7zCSr1hsqEuyYFy+wLMpY3PhIKX0KUiBnXhVBlTy6Ch+wM3n7PXRI2f4tAsL yQtPyBI8/XyzhpddRPT0+N1YasazdZkK8c1he4o+HE1dXTlo3lU4FZc4V3YD2l9UQaYJ12 MQcppkm8AAQWPcAEspY3ef2GotOUBMI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1681394896; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9wqUTjU52GZEJMgfY606YlmSUxRDZN+wxHtKtGPO2vE=; b=SSnG5sdQM85TEZynFh7VpKT1E36ZafGJpBdckhcaXMQN//jg1NB8H0Rb6MG5d9PAeqnL9Z TM0vaSmPRxi8C9Bg== 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 4D95A13421; Thu, 13 Apr 2023 14:08:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id IG33EdAMOGQ1MAAAMHmgww (envelope-from ); Thu, 13 Apr 2023 14:08:16 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 5/8] [gdb/testsuite] Fix timeout in gdb.tui/new-layout.exp Date: Thu, 13 Apr 2023 16:08:24 +0200 Message-Id: <20230413140827.19412-6-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230413140827.19412-1-tdevries@suse.de> References: <20230413140827.19412-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_ASCII_DIVIDERS,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP 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: In test-case gdb.tui/new-layout.exp we run into: ... WARNING: timeout in accept_gdb_output PASS: gdb.tui/new-layout.exp: layout=cmd_only {cmd 1} {} {}: \ bottom of cmd window is blank ... The timeout happens here: ... Term::command "layout src" ... Before the "layout src" command we have: ... Screen Dump (size 80 columns x 24 rows, cursor at column 46, row 7): 0 +-tui-layout.c-------------------------+(gdb) layout example3 1 | 20 { |(gdb) layout src 2 | 21 return 0; |(gdb) winheight cmd 8 3 | 22 } |(gdb) layout example4 4 | 23 |(gdb) layout src 5 | 24 |(gdb) winheight cmd 8 6 | 25 |(gdb) layout example5 7 | 26 |(gdb) 8 | 27 | 9 | 28 | 10 | 29 | 11 | 30 | 12 | 31 | 13 | 32 | 14 | 33 | 15 | 34 | 16 | 35 | 17 | 36 | 18 | 37 | 19 | 38 | 20 | 39 | 21 | 40 | 22 +--------------------------------------+ 23 exec No process In: L?? PC: ?? ... and after: ... Screen Dump (size 80 columns x 24 rows, cursor at column 6, row 16): 0 +-tui-layout.c-----------------------------------------------------------------+ 1 | 20 { | 2 | 21 return 0; | 3 | 22 } | 4 | 23 | 5 | 24 | 6 | 25 | 7 | 26 | 8 | 27 | 9 | 28 | 10 | 29 | 11 | 30 | 12 | 31 | 13 | 32 | 14 +------------------------------------------------------------------------------+ 15 exec No process In: L?? PC: ?? 16 (gdb) 17 18 19 20 21 22 23 ... The Term::command "layout src" is waiting to match: - "(gdb) layout src", and then - "(gdb) ". The first part fails to match on a line: ... | 26 |(gdb) layout src ... because it expects the prompt at the start of the line. Fix this by allowing the prompt at the start of a window as well. Tested by x86_64-linux. --- gdb/testsuite/lib/tuiterm.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp index bb462911046..fa703fc060e 100644 --- a/gdb/testsuite/lib/tuiterm.exp +++ b/gdb/testsuite/lib/tuiterm.exp @@ -850,7 +850,7 @@ namespace eval Term { global gdb_prompt send_gdb "$cmd\n" set str [string_to_regexp $cmd] - set str "^$gdb_prompt $str" + set str "(^|\|)$gdb_prompt $str" wait_for $str } -- 2.35.3