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 401593857C5B for ; Mon, 6 Sep 2021 15:48:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 401593857C5B Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 71F731FF12; Mon, 6 Sep 2021 15:48:34 +0000 (UTC) Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 51016139B3; Mon, 6 Sep 2021 15:48:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id zDAyElI4NmEoZwAAGKfGzw (envelope-from ); Mon, 06 Sep 2021 15:48:34 +0000 Subject: [committed][gdb/testsuite] Handle eof in gdb_internal_error_resync From: Tom de Vries To: gdb-patches@sourceware.org References: <20210905063948.GA22464@delia> Message-ID: Date: Mon, 6 Sep 2021 17:48:33 +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: <20210905063948.GA22464@delia> Content-Type: multipart/mixed; boundary="------------9E391AC06AC1DAF9197400B0" Content-Language: en-US X-Spam-Status: No, score=-12.2 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Mon, 06 Sep 2021 15:48:36 -0000 This is a multi-part message in MIME format. --------------9E391AC06AC1DAF9197400B0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit [ was: Re: [PATCH][gdb/testsuite] Simplify gdb.dwarf2/locexpr-data-member-location.exp ] On 9/5/21 8:39 AM, Tom de Vries wrote: > Then fix the: > ... > ERROR: : spawn id exp9 not open > ... > by handling eof in gdb_internal_error_resync. I've fixed this in a separate patch. Thanks, - Tom --------------9E391AC06AC1DAF9197400B0 Content-Type: text/x-patch; charset=UTF-8; name="0001-gdb-testsuite-Handle-eof-in-gdb_internal_error_resync.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename*0="0001-gdb-testsuite-Handle-eof-in-gdb_internal_error_resync.p"; filename*1="atch" [gdb/testsuite] Handle eof in gdb_internal_error_resync Before commit 5a20fadc841 the test-case gdb.dwarf2/locexpr-data-member-location.exp fails like this: ... FAIL: gdb.dwarf2/locexpr-data-member-location.exp: running to bar in runto \ (GDB internal error) ERROR: : spawn id exp9 not open while executing "expect { -i exp9 -timeout 10 -re "Quit this debugging session\\? \\(y or n\\) $" { send_gdb "n\n" answer incr count } -re "Create ..." ("uplevel" body line 1) invoked from within "uplevel $body" NONE : spawn id exp9 not open ERROR: Could not resync from internal error (timeout) ... Fix the: ... ERROR: : spawn id exp9 not open ... by handling eof in gdb_internal_error_resync, such that we have instead: ... FAIL: gdb.dwarf2/locexpr-data-member-location.exp: running to bar in runto \ (GDB internal error) ERROR: Could not resync from internal error (eof) ... Tested on x86_64-linux. --- gdb/testsuite/lib/gdb.exp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 00336bd588e..cdda51529fb 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -770,6 +770,10 @@ proc gdb_internal_error_resync {} { perror "Could not resync from internal error (timeout)" return 0 } + eof { + perror "Could not resync from internal error (eof)" + return 0 + } } } perror "Could not resync from internal error (resync count exceeded)" --------------9E391AC06AC1DAF9197400B0--