From patchwork Fri Mar 10 15:34:32 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: 66231 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 900613858281 for ; Fri, 10 Mar 2023 15:35:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 900613858281 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678462557; bh=pZ+Ziw+EzO4aU4O2hDLCO5k0n0si1PTYsYz1N46kZHc=; 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=eZl0GkGR1Sn4/wxGBNs5c15Zbgvk3wGfvMrn2WT05UWPL68dXWf/JOmUlqfQ1vUi/ +t50HH+VYLvwAWWxhEPOi8clH/ruaLuogWj3n6LCkDSm5kQr8e7vkPq0+DviTecjBn /uSd5wfP46nSEUiGjg3iwhPZC9a3M/ZBIZ3DmurM= 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 490633857C4F for ; Fri, 10 Mar 2023 15:34:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 490633857C4F 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 76A302065C for ; Fri, 10 Mar 2023 15:34:35 +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 60FA2134F7 for ; Fri, 10 Mar 2023 15:34:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +NaDFgtOC2SxBwAAMHmgww (envelope-from ) for ; Fri, 10 Mar 2023 15:34:35 +0000 To: gdb-patches@sourceware.org Subject: [pushed 3/4] [gdb/testsuite] Fix gdb.python/py-cmd.exp Date: Fri, 10 Mar 2023 16:34:32 +0100 Message-Id: <20230310153433.6265-3-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230310153433.6265-1-tdevries@suse.de> References: <20230310153433.6265-1-tdevries@suse.de> 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, 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" [ Using $pp as shorthand for the pagination prompt "--Type for more, q to quit, c to continue without paging--". ] The test-case gdb.python/py-cmd.exp passes, but the handling of the test_multiline command output looks a bit odd: ... (gdb) test_multiline test_multiline output ... test_multiline output $ppPASS: gdb.python/py-cmd.exp: verify pagination from test_multiline q test_multiline Quit (gdb) test_multiline test_multiline output ... test_multiline output $ppPASS: gdb.python/py-cmd.exp: verify pagination from test_multiline: q ... What happens is: - a test_multiline command is issued - some output is printed, followed by a pagination prompt - the test-case concludes that pagination occurred, and produces a PASS - "q\n" is replied to the pagination prompt - without waiting for response to the "q\n", another test_multiline command is issued - in response to the "q\n" we get "Quit\n(gdb) " - some output is printed, followed by a pagination prompt - the test-case concludes that there's a valid response to the "q\n", and produces a PASS, consuming the second pagination prompt, but without a reply. My conclusion is that the second test_multiline command is unintentional, so fix this by removing it. Without it, we have the more straightforward: ... (gdb) test_multiline test_multiline output ... test_multiline output $ppPASS: gdb.python/py-cmd.exp: verify pagination from test_multiline q Quit (gdb) PASS: gdb.python/py-cmd.exp: verify pagination from test_multiline: q ... This also fixes the following warning with target board native-gdbserver: ... WARNING: Timed out waiting for EOF in server after monitor exit ... Tested on x86_64-linux. --- gdb/testsuite/gdb.python/py-cmd.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.python/py-cmd.exp b/gdb/testsuite/gdb.python/py-cmd.exp index 016ea445f10..12b52e4fd61 100644 --- a/gdb/testsuite/gdb.python/py-cmd.exp +++ b/gdb/testsuite/gdb.python/py-cmd.exp @@ -291,7 +291,7 @@ gdb_test_multiple "test_multiline" $test { send_gdb "q\n" set test "verify pagination from test_multiline: q" -gdb_test_multiple "test_multiline" $test { +gdb_test_multiple "" $test { -re "Error occurred in Python" { fail $test }