From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qLTKHnNwVGEFMAAAWB0awg (envelope-from ) for ; Wed, 29 Sep 2021 09:56:03 -0400 Received: by simark.ca (Postfix, from userid 112) id 7B31E1EE27; Wed, 29 Sep 2021 09:56:03 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 95EA21EE24 for ; Wed, 29 Sep 2021 09:56:02 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4D9753857C40 for ; Wed, 29 Sep 2021 13:56:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4D9753857C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1632923762; bh=ImHZ9e4shjZ7oAgFg4IxyGNH7UKATRCC9Zkwq9fT4v8=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=UU5iqasl2LRo/qaZUDfUHlZXVXMtn/oZEsBKYieDHsL9pVANG36PSYwGDsmn2W0og MMnnmjiQaw3+wx1Gg9xkdOpyhtEmHXVG5fmX8WA47mCpLDJy2xyGus+WBpUAJjtNY8 U/+eiDFR+f8jNSMhBEc8U4/WT6zlZ5hJwlm8uKC4= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id E24B3385800A for ; Wed, 29 Sep 2021 13:55:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E24B3385800A 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-out1.suse.de (Postfix) with ESMTPS id 235412236F for ; Wed, 29 Sep 2021 13:55:24 +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 0EE9514027 for ; Wed, 29 Sep 2021 13:55:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yAmnAkxwVGEvYQAAMHmgww (envelope-from ) for ; Wed, 29 Sep 2021 13:55:24 +0000 Date: Wed, 29 Sep 2021 15:55:22 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Disable vgdb tests if xml not supported Message-ID: <20210929135520.GA16103@delia> 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, I build gdb without xml support using --without-expat, and ran into: ... (gdb) target remote | vgdb --wait=2 --max-invoke-ms=2500 --pid=22032^M Remote debugging using | vgdb --wait=2 --max-invoke-ms=2500 --pid=22032^M relaying data between gdb and process 22032^M warning: Can not parse XML target description; XML support was disabled at \ compile time^M ... (gdb) PASS: gdb.base/valgrind-infcall.exp: continue #1 p gdb_test_infcall ()^M Remote 'g' packet reply is too long (expected 560 bytes, got 800 bytes): ...^M (gdb) FAIL: gdb.base/valgrind-infcall.exp: p gdb_test_infcall () ... After googling the error message with context valgrind gdbserver, I found indications that the Remote 'g' packet reply error is due to missing xml support. And here ( https://www.valgrind.org/docs/manual/manual-core-adv.html ) I found: ... GDB version needed for ARM and PPC32/64. You must use a GDB version which is able to read XML target description sent by a gdbserver. This is the standard setup if GDB was configured and built with the "expat" library. If your GDB was not configured with XML support, it will report an error message when using the "target" command. Debugging will not work because GDB will then not be able to fetch the registers from the Valgrind gdbserver. ... So I guess I'm running into the same problem for x86_64. Fix this by skipping all gdb.base/valgrind-*.exp tests if xml support is not available. Although only the gdb.base/valgrind-infcall*.exp produce fails, the Remote 'g' packet reply error occurs in all tests, so it seems prudent to disable them all. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Disable vgdb tests if xml not supported --- gdb/testsuite/gdb.base/valgrind-bt.exp | 5 +++++ gdb/testsuite/gdb.base/valgrind-disp-step.exp | 5 +++++ gdb/testsuite/gdb.base/valgrind-infcall-2.exp | 5 +++++ gdb/testsuite/gdb.base/valgrind-infcall.exp | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/gdb/testsuite/gdb.base/valgrind-bt.exp b/gdb/testsuite/gdb.base/valgrind-bt.exp index b559e433d72..4b84a45d333 100644 --- a/gdb/testsuite/gdb.base/valgrind-bt.exp +++ b/gdb/testsuite/gdb.base/valgrind-bt.exp @@ -13,6 +13,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +if { [gdb_skip_xml_test] } { + # Valgrind gdbserver requires gdb with xml support. + return 0 +} + load_lib valgrind.exp if [is_remote target] { diff --git a/gdb/testsuite/gdb.base/valgrind-disp-step.exp b/gdb/testsuite/gdb.base/valgrind-disp-step.exp index 3aecf00a291..f9429fbd69a 100644 --- a/gdb/testsuite/gdb.base/valgrind-disp-step.exp +++ b/gdb/testsuite/gdb.base/valgrind-disp-step.exp @@ -18,6 +18,11 @@ # really tests is that GDB falls back to in-line stepping # automatically instead of getting stuck or crashing. +if { [gdb_skip_xml_test] } { + # Valgrind gdbserver requires gdb with xml support. + return 0 +} + load_lib valgrind.exp if [is_remote target] { diff --git a/gdb/testsuite/gdb.base/valgrind-infcall-2.exp b/gdb/testsuite/gdb.base/valgrind-infcall-2.exp index 82b3f4e5c49..30881ca72ea 100644 --- a/gdb/testsuite/gdb.base/valgrind-infcall-2.exp +++ b/gdb/testsuite/gdb.base/valgrind-infcall-2.exp @@ -29,6 +29,11 @@ # terminate called after throwing an instance of 'gdb_exception_error' # Aborted (core dumped) +if { [gdb_skip_xml_test] } { + # Valgrind gdbserver requires gdb with xml support. + return 0 +} + load_lib valgrind.exp if [is_remote target] { diff --git a/gdb/testsuite/gdb.base/valgrind-infcall.exp b/gdb/testsuite/gdb.base/valgrind-infcall.exp index 658d2bdb3de..0108f92ceaf 100644 --- a/gdb/testsuite/gdb.base/valgrind-infcall.exp +++ b/gdb/testsuite/gdb.base/valgrind-infcall.exp @@ -13,6 +13,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +if { [gdb_skip_xml_test] } { + # Valgrind gdbserver requires gdb with xml support. + return 0 +} + load_lib valgrind.exp if [is_remote target] {