From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 330D93858D1E for ; Tue, 29 Nov 2022 16:42:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 330D93858D1E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 2ATGfuE1005739 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Nov 2022 11:42:01 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 2ATGfuE1005739 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1669740121; bh=vZzXuYISLQzGvyt0X6hoH4mAsvjTTAlSLbBYUPEcRZk=; h=Date:Subject:To:References:From:In-Reply-To:From; b=kG4AtYEizIMa9ImzCN3MfW2OB55dQz5KKMpcxmdmlqOgwrhyYdZrf+i6efbRSxm0Z IYSe6cYLtnhfEZtO/c0CzY8DcNOtwWFYEK8vqF0JH9SYulln3ig0XwVsxWdxcnewAJ Bw08BaRut7t0iQXDdtv5uWHtQ/4j7VrJ39UxrQ7w= Received: from [172.16.0.64] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 460AD1E0D3; Tue, 29 Nov 2022 11:41:56 -0500 (EST) Message-ID: Date: Tue, 29 Nov 2022 11:41:55 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: =?UTF-8?Q?Re=3a_=5bPATCH_1/2=5d_gdb/testsuite=3a_make_gdb=5ftest=5f?= =?UTF-8?Q?multiple_return_immediately_if=c2=a0send=5fgdb_fails?= Content-Language: fr To: Tom de Vries , Simon Marchi , gdb-patches@sourceware.org References: <20221122155546.599061-1-simon.marchi@efficios.com> <31f19abf-7924-48da-e4ac-49f5c12ccccb@suse.de> From: Simon Marchi In-Reply-To: <31f19abf-7924-48da-e4ac-49f5c12ccccb@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 29 Nov 2022 16:41:56 +0000 X-Spam-Status: No, score=-3030.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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: On 11/29/22 11:21, Tom de Vries wrote: > On 11/22/22 16:55, Simon Marchi via Gdb-patches wrote: >> From: Simon Marchi >> >> In the failure seen by Philippe here: >> >>    https://inbox.sourceware.org/gdb-patches/20221120173024.3647464-1-philippe.waroquiers@skynet.be/ >> >> ... the testsuite only outputs PASSes, and an ERROR, resulting from an >> uncaught exception.  This is a bit sneaky, because ERRORs are not >> reported in the test summary.  In certain circumstances, it can be easy >> to miss. >> >> Normally, gdb_test_multiple outputs an UNRESOLVED when GDB crashes.  But > this is only if it manages to send the command, and it's that command >> that crashes GDB.  Here, the ERROR is due to the fact that GDB had >> already crashed by the time we entered gdb_test_multiple and tried to >> send a command.  GDB was crashed by the previous "file" command, sent by >> gdb_unload.  Because gdb_unload uses bare expect, it didn't record a >> test failure when crashing GDB (this will be addressed separately). >> >> In this patch, I propose to make gdb_test_multiple call unresolved >> directly and return -1 send_gdb fails.  This way, if GDB is already >> crashed by the time we enter gdb_test_multiple, it will leave a trace in >> the test results in the form of an UNRESOLVED.  It will also spare us of > > spare us of the -> spare us the ? Fixed. >> the not-so-useful-in-my-opinion TCL backtrace. >> > > Agreed. > >> Before, it looks like: >> >>      ERROR: Couldn't send python print(objfile.filename) to GDB. >>      ERROR: : spawn id exp9 not open >>          while executing >>      "expect { >>      -i exp9 -timeout 10 >>              -re ".*A problem internal to GDB has been detected" { >>                  fail "$message (GDB internal error)" >>                  gdb_internal_error..." >>          ("uplevel" body line 1) >>          invoked from within >>      "uplevel $body" NONE : spawn id exp9 not open >> >> And after: >> >>      Couldn't send python print(objfile.filename) to GDB. >>      UNRESOLVED: gdb.python/py-objfile.exp: objfile.filename after objfile is unloaded >> > > LGTM, thanks for doing this. Thanks, will push. Simon