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 BFD513858D38 for ; Sat, 29 Oct 2022 07:43:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BFD513858D38 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-out2.suse.de (Postfix) with ESMTPS id EC9261FAA1 for ; Sat, 29 Oct 2022 07:43:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1667029437; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RpNFe3+Jpr+PHf4xQXfgyr/Qrea+s2/TVyA/nU/AnVw=; b=t9V+CiUKGcUip0Btmn30uq/zXAEK/mwAwX7W2BmcU8nA3IexJ/xHxqMhdQXPJozXuZjMbY R7sUCe5yv7dcbJEmrtmh8Kj16Eqk/B6Ngfhixp1qIjroowwW+gbyQnQD3pZrjKGGGI9PNR oGYBgsLIC0c/Ovnn2ZDA1i5t3BfEip0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1667029437; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RpNFe3+Jpr+PHf4xQXfgyr/Qrea+s2/TVyA/nU/AnVw=; b=cpcp7rhnlDnvhcoEzWE8JYYD8W4gSxQCjxH4ikyX7lZ2rGDnMghnuSDFWm87u6w2DEGc7H aYyzhSVbKm4SzMDg== 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 D95D213AAD for ; Sat, 29 Oct 2022 07:43:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +CLtM73ZXGO+VgAAMHmgww (envelope-from ) for ; Sat, 29 Oct 2022 07:43:57 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed 1/3] [gdb/testsuite] Consume output asap in gdb.server/multi-ui-errors.exp Date: Sat, 29 Oct 2022 09:43:55 +0200 Message-Id: <20221029074357.12305-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221029074357.12305-1-tdevries@suse.de> References: <20221029074357.12305-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: With test-case gdb.server/multi-ui-errors.exp we see: ... (gdb) PASS: multi-ui-errors.exp: main UI, prompt after gdbserver dies continue^M Continuing.^M echo^M (gdb) PASS: multi-ui-errors.exp: extra UI, prompt after gdbserver dies ... The continue is issued earlier in the test-case, but the output has not been consumed, which makes it show up much later. Consume the continue output asap, to make it clear when the continue is issued: ... (gdb) PASS: gdb.server/multi-ui-errors.exp: connect to gdbserver continue^M Continuing.^M PASS: gdb.server/multi-ui-errors.exp: continue - extra UI ... Tested on x86_64-linux. --- gdb/testsuite/gdb.server/multi-ui-errors.exp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.server/multi-ui-errors.exp b/gdb/testsuite/gdb.server/multi-ui-errors.exp index d3ddd0f2d08..8a1276fb272 100644 --- a/gdb/testsuite/gdb.server/multi-ui-errors.exp +++ b/gdb/testsuite/gdb.server/multi-ui-errors.exp @@ -75,7 +75,13 @@ with_spawn_id $extra_spawn_id { with_spawn_id $extra_spawn_id { gdb_test "target $gdbserver_protocol $gdbserver_gdbport" ".*" \ "connect to gdbserver" - send_gdb "continue\n" + + # Issue a continue and consume the response. Don't expect a prompt. + gdb_test_multiple "continue" "continue - extra UI" { + -re "\r\nContinuing\.\r\n" { + pass $gdb_test_name + } + } } # We're going to kill the gdbserver, but before we do, lets make sure -- 2.35.3