From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id D0952385843F; Sat, 29 Oct 2022 07:43:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D0952385843F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667029418; bh=fTKns0Q0PhjQu/OkL65Cn93tB/e9EVmx6K3SyEBFzPE=; h=From:To:Subject:Date:From; b=lYESU3UqtkaG5t5Pl5tQ/KP0LXMNke7axUEJF+U5QnR1t/b9qFzDWnBc4x1XKQeqF xbHc9UppOYz5Qn+D/s03eFSyoM228m9eRYTEzSdGvqRtC3DgXjhidMtSmPRZQZGCtm TFNUDPmRrCgaGNa8+m2p92VQ2sBGCnr/qofPchaA= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Consume output asap in gdb.server/multi-ui-errors.exp X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 488ed354c8514ba93286f8676a64b7841bb1fda4 X-Git-Newrev: 64ba0c58a79bdec307b722cc09aab724d34ba28b Message-Id: <20221029074338.D0952385843F@sourceware.org> Date: Sat, 29 Oct 2022 07:43:36 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D64ba0c58a79b= dec307b722cc09aab724d34ba28b commit 64ba0c58a79bdec307b722cc09aab724d34ba28b Author: Tom de Vries Date: Sat Oct 29 09:43:32 2022 +0200 [gdb/testsuite] Consume output asap in gdb.server/multi-ui-errors.exp =20 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 ... =20 The continue is issued earlier in the test-case, but the output has not= been consumed, which makes it show up much later. =20 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 ... =20 Tested on x86_64-linux. Diff: --- 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/g= db.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 + } + } } =20 # We're going to kill the gdbserver, but before we do, lets make sure