From patchwork Sat Oct 29 07:43:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 59615 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7CBE8385842A for ; Sat, 29 Oct 2022 07:44:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7CBE8385842A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667029494; bh=RpNFe3+Jpr+PHf4xQXfgyr/Qrea+s2/TVyA/nU/AnVw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ZboOb5fNtkEmA+CmemAdYysfCYyorY+ne6JzO3t4QHm8wYjw1xxlv9ejtvg/kT6h8 QimVvAHkeAa0Orb/L66c2qdQNAX0hywQYdc7lgq7m7qm/X3d8b1J/rdR2nTrFGe6wT euVpJ63Q3tbFCxHkfHSdUTuZqiSjGJTl5c+FRdmU= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org 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 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) 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 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 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 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-Patchwork-Original-From: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" 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