From patchwork Wed May 31 13:07:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 70380 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 65E043857C51 for ; Wed, 31 May 2023 13:07:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 65E043857C51 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1685538455; bh=+hvlYKWVGg7HwkQFPRxzwPE2N9J4FLbWLYot44o9LNw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=SXmIDT2NOtpfRCUNFebGUK0cIVrIIKGdccpRQT0R0FFWPEY0u8BuzHsvTgChqGHBK U1lKVhoFNar6c2ZijfJGwvS5ijoGIx31IAPhTailLSVU9d9k61RVm/lAPvlyfoDJXA mXTfIalEMaCyrK5OTfIzSGQm3UwHvko1TW7mzIm4= 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 739523858D20 for ; Wed, 31 May 2023 13:07:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 739523858D20 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 AC6F31F8CD for ; Wed, 31 May 2023 13:07:02 +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 971DA13488 for ; Wed, 31 May 2023 13:07:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 0PajI3ZGd2QSfgAAMHmgww (envelope-from ) for ; Wed, 31 May 2023 13:07:02 +0000 To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Fix gdb.tui/pr30056.exp for native-extended-gdbserver Date: Wed, 31 May 2023 15:07:03 +0200 Message-Id: <20230531130703.18985-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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" When running test-case gdb.tui/pr30056.exp with target board native-extended-gdbserver, I run into: ... Quit^[[K^M^[[B(gdb) PASS: gdb.tui/pr30056.exp: Control-C Remote debugging from host ::1, port 38810^M ^M(failed reverse-i-search)`xyz': ^M(gdb) target extended-remote \ localhost:2346^[[7GWARNING: Timed out waiting for EOF in server after \ monitor exit ... This is due to the fact that ^C doesn't abort the reverse-i-search. This appears to be due to a readline problem. A PR is open about this: PR cli/30498. Add a KFAIL for the PR, and ensure that the isearch is aborted by using ^G, such that we have a responsive prompt to handle the "monitor exit" command that native-extended-gdbserver issues. Tested on x86_64-linux. --- gdb/testsuite/gdb.tui/pr30056.exp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) base-commit: 768d1d879be2d134e049521f28d4d5e03b69bafc diff --git a/gdb/testsuite/gdb.tui/pr30056.exp b/gdb/testsuite/gdb.tui/pr30056.exp index 4ca7a8b56a8..48eaa5735b8 100644 --- a/gdb/testsuite/gdb.tui/pr30056.exp +++ b/gdb/testsuite/gdb.tui/pr30056.exp @@ -53,4 +53,35 @@ save_vars { env(LC_ALL) } { # Send ^C. send_gdb "\003" gdb_assert { [Term::wait_for "Quit"] } "Control-C" + + # Uncomment this to simulate that PR cli/30498 is fixed. + #send_gdb "\007" + + set test "Control-C aborts isearch" + + # Send "xyz", again. + send_gdb "xyz" + # Wait for xyx to appear. + Term::wait_for_region_contents 0 $Term::_cur_row $Term::_cols 1 "xyz" + + if { [Term::check_region_contents_p 0 $Term::_cur_row $Term::_cols 1 \ + "^$gdb_prompt xyz"] } { + pass $test + + # Send ^C to clear the command line. + send_gdb "\003" + } else { + # Sending ^C currently doesn't abort the i-search. PR cli/30498 is + # open about this. + kfail cli/30498 $test + + # At this point we don't have a reponsive prompt. Send ^G to abort + # the i-search. + send_gdb "\007" + } + + # We need a reponsive prompt here, to deal with the "monitor exit" + # that native-extended-gdbserver will send. Check that we have a + # responsive prompt. + Term::command "echo \\n" }