From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sLELGgGkSWM2UAwAWB0awg (envelope-from ) for ; Fri, 14 Oct 2022 14:01:37 -0400 Received: by simark.ca (Postfix, from userid 112) id 66F7A1E112; Fri, 14 Oct 2022 14:01:37 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=oOCGvfH/; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 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 18C631E0D3 for ; Fri, 14 Oct 2022 14:01:37 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BE32C3857BAD for ; Fri, 14 Oct 2022 18:01:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE32C3857BAD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665770496; bh=kZiI7goitXrGwQYi2RGJS/VtK5p0DPR1x0UV140asC0=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=oOCGvfH/05VCwQ0DQ31DmVlfrolTmLuYBl1dSU12x8h/cPPNe6pap2hpBj9IaTU3A q/M54sO2I4LbnGzPJhseg2RNs7NRI4H2+xjr9MjQJKG7ssvl4j19Vy8G4jMg1yf1mL 5U+PXAVwNHTnEk7cswV/68u7ucvnqBPW/zh5GkCw= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 164C63858D38 for ; Fri, 14 Oct 2022 18:01:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 164C63858D38 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 4FE0820D3A for ; Fri, 14 Oct 2022 18:01:17 +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 3B58213451 for ; Fri, 14 Oct 2022 18:01:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uaRIDe2jSWP1NwAAMHmgww (envelope-from ) for ; Fri, 14 Oct 2022 18:01:17 +0000 Date: Fri, 14 Oct 2022 20:01:15 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.server/unittest.exp with host board local-remote-host.exp Message-ID: <20221014180114.GA19703@delia.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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 Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, With test-case gdb.server/unittest.exp and host board local-remote-host.exp I run into: ... builtin_spawn build/gdbserver/gdbserver --selftest^M ERROR: : spawn id exp7 not open while executing "expect { -i exp7 -timeout 10 -i $server_spawn_id -re "Ran ($decimal) unit tests, 0 failed" { set num_ran $expect_out(1,string) gdb_assert "..." ("uplevel" body line 1) invoked from within "uplevel $body" NONE : spawn id exp7 not open UNRESOLVED: gdb.server/unittest.exp: unit tests ... The problem is (as fixed for avr in commit df5b8876083 ("gdb/testsuite: better handle failures in simavr board, reap simavr process")), that gdb_expect through remote_expect adds a "-i -timeout 10", which is the one causing the error. As in aforementioned commit, fix this by using expect instead. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.server/unittest.exp with host board local-remote-host.exp --- gdb/testsuite/gdb.server/unittest.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.server/unittest.exp b/gdb/testsuite/gdb.server/unittest.exp index 57157ef8d35..d083ef25487 100644 --- a/gdb/testsuite/gdb.server/unittest.exp +++ b/gdb/testsuite/gdb.server/unittest.exp @@ -31,7 +31,7 @@ set gdbserver_command "$gdbserver --selftest" set server_spawn_id [remote_spawn target $gdbserver_command] set test "unit tests" -gdb_expect { +expect { -i $server_spawn_id -re "Ran ($decimal) unit tests, 0 failed" { set num_ran $expect_out(1,string)