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 490633857C4F for ; Fri, 10 Mar 2023 15:34:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 490633857C4F 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 76A302065C for ; Fri, 10 Mar 2023 15:34:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678462475; 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=pZ+Ziw+EzO4aU4O2hDLCO5k0n0si1PTYsYz1N46kZHc=; b=FnKFajtnao6CALq3xvYQIY5RlQpG4uhxrH/BG5JvVuSqL4v1bi3gwoW1pezzOrWv2lUU+w oBsDWa8BIyGVpnN4nD5vLYbQ/v+HtaV4JbdNKkzoSNWhS7Ps/5wvL8X1qU0/Yb5pYg/ASV BTRG0nANbbqj1TxQP6Yf8KDl/M/kQvg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678462475; 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=pZ+Ziw+EzO4aU4O2hDLCO5k0n0si1PTYsYz1N46kZHc=; b=PXkAsSNWpzVxSqRjNxcAMI0HFcTcCv/pBurq4x/PIfCuszd/TedsRskExagXQrza+JUzC7 T88Qew/uuht/tnCw== 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 From: Tom de Vries 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 Content-Transfer-Encoding: 8bit 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 List-Id: [ 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 } -- 2.35.3