From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id uE18KJt/cGGyMQAAWB0awg (envelope-from ) for ; Wed, 20 Oct 2021 16:44:11 -0400 Received: by simark.ca (Postfix, from userid 112) id A38A11F0BD; Wed, 20 Oct 2021 16:44:11 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 3EDF91EDDB for ; Wed, 20 Oct 2021 16:44:11 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E7C503857C52 for ; Wed, 20 Oct 2021 20:44:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7C503857C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1634762650; bh=h3zR+5r5WR3pxjPUaghS9m7h6qZKh1P+JpxpVHxRn6E=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=jjBAf0DNO5LNwjsRmKQIoAh5p+ioqpj7aosDhTl5ajIpn1rHw5+WkKFwtLJT51SAe DOZ5qiTcEAIsVnXyxiCZCW1IxKJQTmF3NOOo3ysYr3tv3q68tW46i+QMRO8laQV5iS kO0TgqnVu3OPqUph8XrXHB8C6i9H/cbQXeAZc9/8= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 822483858409 for ; Wed, 20 Oct 2021 20:43:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 822483858409 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 B39BB1FD39; Wed, 20 Oct 2021 20:43:51 +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 9837C13C12; Wed, 20 Oct 2021 20:43:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 28XeI4d/cGE6MAAAMHmgww (envelope-from ); Wed, 20 Oct 2021 20:43:51 +0000 Subject: Re: [PATCH][gdb] Make execute_command_to_string return string on throw To: Tom Tromey , Tom de Vries via Gdb-patches References: <20210911120202.GA16898@delia.home> <2f2ce317-ae71-88b8-4b84-5eead84c376d@simark.ca> <87a6j3v86x.fsf@tromey.com> Message-ID: <58e3dbe9-83c1-9608-f1db-c9a9623d8367@suse.de> Date: Wed, 20 Oct 2021 22:43:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <87a6j3v86x.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Cc: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 10/20/21 8:53 PM, Tom Tromey wrote: >>> The code LGTM, but could you write / update a test for this? > > Tom> The patch "[gdb/testsuite] Reimplement gdb.gdb/python-interrupts.exp as > Tom> unittest" uses this. It checks the output of a command that is also > Tom> throwing a "Error while executing Python code". > > FWIW the new self-test fails for me: > > (gdb) maint selftest python > Running selftest python. > 5 > Self test failed: self-test failed at ../../binutils-gdb/gdb/python/python.c:1932 > Ran 1 unit tests, 1 failed Hmm, I get: ... $ gdb -q (gdb) maint selftest python Running selftest python. Ran 1 unit tests, 0 failed (gdb) ... Do you have any idea how I could reproduce the fail you're seeing? FWIW, I don't understand the '5' showing up. The test is using execute_fn_to_ui_file which should take care of redirecting things. Thanks, - Tom