From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 6DCAC383541F for ; Mon, 7 Jun 2021 12:34:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6DCAC383541F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7EE5D1FDA1 for ; Mon, 7 Jun 2021 12:34:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1623069268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=ANou3memgQ+g9MEFyaWa0N15vP3lIM7wBpX0aA8WXsU=; b=gWM2DBS9vpKZcHg5mJLBu//nBBFtqvZZjCeeAFBM6zhPWs88Z4YAl36jlUXufn7H/WwJPu Ygrt14DOsmCdml9qZw+VIrhKZ7TuJBEtfj/aqXF5V++n3f9IRWdsi8Pc+t0nfZkp4mch0L tVoQSxEoDRcQWRqr5zML3FIF77dbQR8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1623069268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=ANou3memgQ+g9MEFyaWa0N15vP3lIM7wBpX0aA8WXsU=; b=bpMyRMKUNBSi4g9VP7bMx1g9DGkqUHC5RdSLnc4eUTqS8rDh5j/6hGfIb9ULAIh4EMIXBy phaoM5mxjabRafAg== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 6048A118DD for ; Mon, 7 Jun 2021 12:34:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1623069268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=ANou3memgQ+g9MEFyaWa0N15vP3lIM7wBpX0aA8WXsU=; b=gWM2DBS9vpKZcHg5mJLBu//nBBFtqvZZjCeeAFBM6zhPWs88Z4YAl36jlUXufn7H/WwJPu Ygrt14DOsmCdml9qZw+VIrhKZ7TuJBEtfj/aqXF5V++n3f9IRWdsi8Pc+t0nfZkp4mch0L tVoQSxEoDRcQWRqr5zML3FIF77dbQR8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1623069268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=ANou3memgQ+g9MEFyaWa0N15vP3lIM7wBpX0aA8WXsU=; b=bpMyRMKUNBSi4g9VP7bMx1g9DGkqUHC5RdSLnc4eUTqS8rDh5j/6hGfIb9ULAIh4EMIXBy phaoM5mxjabRafAg== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id uu+LFlQSvmAzfwAALh3uQQ (envelope-from ) for ; Mon, 07 Jun 2021 12:34:28 +0000 Date: Mon, 7 Jun 2021 14:34:27 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.base/new-ui-pending-input.exp timeout Message-ID: <20210607123425.GA8483@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-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Mon, 07 Jun 2021 12:34:39 -0000 Hi, With a testsuite setup modified to make expect wait a little bit longer for gdb output (see PR27957), I run into: ... PASS: gdb.base/new-ui-pending-input.exp: spawn gdb print 1^M print 2^M print 3^M (gdb) $1 = 1^M (gdb) $2 = 2^M (gdb) $3 = 3^M (gdb) PASS: gdb.base/new-ui-pending-input.exp: initial prompt on extra console ^M Breakpoint 1, main () at new-ui-pending-input.c:25^M 25 return 0; /* set breakpoint here */^M FAIL: gdb.base/new-ui-pending-input.exp: print 1 on extra console (timeout) ... Usually, I get a pass instead. In the passing case, the "initial prompt" PASS is after the first prompt: ... PASS: gdb.base/new-ui-pending-input.exp: spawn gdb print 1^M print 2^M print 3^M (gdb) PASS: gdb.base/new-ui-pending-input.exp: initial prompt on extra console ... while in the failing case, that PASS is after the fourth prompt. The regexp doesn't match the first prompt because it terminates with a '$': ... -re "$gdb_prompt $" { ... Fix this by removing the terminating '$' and prefixing the regex with something unique to the first prompt: "print 3". Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.base/new-ui-pending-input.exp timeout gdb/testsuite/ChangeLog: 2021-06-07 Tom de Vries * gdb.base/new-ui-pending-input.exp (test_command_line_new_ui_pending_input): Fix regexp for "initial prompt on extra console". --- gdb/testsuite/gdb.base/new-ui-pending-input.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/new-ui-pending-input.exp b/gdb/testsuite/gdb.base/new-ui-pending-input.exp index 09e10f9567f..4853f951e86 100644 --- a/gdb/testsuite/gdb.base/new-ui-pending-input.exp +++ b/gdb/testsuite/gdb.base/new-ui-pending-input.exp @@ -77,7 +77,7 @@ proc test_command_line_new_ui_pending_input {} { with_spawn_id $extra_spawn_id { set test "initial prompt on extra console" gdb_test_multiple "" $test { - -re "$gdb_prompt $" { + -re "\r\nprint 3\r\n$gdb_prompt " { pass $test } }