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 AF1F13858293 for ; Tue, 18 Oct 2022 13:33:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AF1F13858293 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 C0A0A2067B for ; Tue, 18 Oct 2022 13:33:29 +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 AD4C3139D2 for ; Tue, 18 Oct 2022 13:33:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QHwzKSmrTmNPHwAAMHmgww (envelope-from ) for ; Tue, 18 Oct 2022 13:33:29 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 4/4] [gdb/testsuite] Handle header files with local-remote-host.exp Date: Tue, 18 Oct 2022 15:33:28 +0200 Message-Id: <20221018133328.7574-5-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221018133328.7574-1-tdevries@suse.de> References: <20221018133328.7574-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, 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 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: Tue, 18 Oct 2022 13:34:48 -0000 With test-case gdb.base/included.exp and host board local-remote-host.exp with tentative fix for PR29697 I run into: ... included.c:18:10: fatal error: included.h: No such file or directory #include "included.h" ^~~~~~~~~~~~ compilation terminated. ... Fix this by adding the missing gdb_remote_download calls. Likewise in a few other test-cases. Tested on x86_64-linux. --- gdb/testsuite/gdb.base/included.exp | 6 +++++- gdb/testsuite/gdb.base/large-frame.exp | 4 ++++ gdb/testsuite/gdb.base/line-symtabs.exp | 4 ++++ gdb/testsuite/gdb.base/sep.exp | 4 ++++ gdb/testsuite/gdb.base/shlib-call.exp | 4 ++++ 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/included.exp b/gdb/testsuite/gdb.base/included.exp index 336eb636ceb..a4e195b3dc1 100644 --- a/gdb/testsuite/gdb.base/included.exp +++ b/gdb/testsuite/gdb.base/included.exp @@ -13,6 +13,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +if { [is_remote host] } { + gdb_remote_download host $srcdir/$subdir/included.h +} + standard_testfile if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { return -1 @@ -33,4 +37,4 @@ gdb_test "ptype integer" "type = int" # We should report that integer comes from the header file. if { $non_dwarf } { setup_xfail *-*-* } -gdb_test "info variables integer" "\r\nFile \[^\r\n\]*/${subdir}/${testfile}.h:\r\n.*\tint integer;" +gdb_test "info variables integer" "\r\nFile \[^\r\n\]*${testfile}.h:\r\n.*\tint integer;" diff --git a/gdb/testsuite/gdb.base/large-frame.exp b/gdb/testsuite/gdb.base/large-frame.exp index bb33dc8880e..b58a43f81a3 100644 --- a/gdb/testsuite/gdb.base/large-frame.exp +++ b/gdb/testsuite/gdb.base/large-frame.exp @@ -15,6 +15,10 @@ # # This file is part of the gdb testsuite. +if { [is_remote host] } { + gdb_remote_download host $srcdir/$subdir/large-frame.h +} + # This test was added to test GDB's ability to backtrace over a large # stack frame for which there is no debug information. This should # test the non-DWARF stack unwinder. diff --git a/gdb/testsuite/gdb.base/line-symtabs.exp b/gdb/testsuite/gdb.base/line-symtabs.exp index aec2d5a8c0f..c5be941695b 100644 --- a/gdb/testsuite/gdb.base/line-symtabs.exp +++ b/gdb/testsuite/gdb.base/line-symtabs.exp @@ -16,6 +16,10 @@ standard_testfile .c line-symtabs.h +if { [is_remote host] } { + gdb_remote_download host $srcdir/$subdir/$srcfile2 +} + if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return -1 } diff --git a/gdb/testsuite/gdb.base/sep.exp b/gdb/testsuite/gdb.base/sep.exp index d8b9ef7d5df..52a62a252fc 100644 --- a/gdb/testsuite/gdb.base/sep.exp +++ b/gdb/testsuite/gdb.base/sep.exp @@ -13,6 +13,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +if { [is_remote host] } { + gdb_remote_download host $srcdir/$subdir/sep-proc.c +} + standard_testfile .c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } { diff --git a/gdb/testsuite/gdb.base/shlib-call.exp b/gdb/testsuite/gdb.base/shlib-call.exp index ceef308380e..c6925709676 100644 --- a/gdb/testsuite/gdb.base/shlib-call.exp +++ b/gdb/testsuite/gdb.base/shlib-call.exp @@ -33,6 +33,10 @@ if {[skip_shlib_tests]} { return 0 } +if { [is_remote host] } { + gdb_remote_download host $srcdir/$subdir/ss.h +} + standard_testfile shmain.c shr1.c shr2.c set srcfile ${srcdir}/${subdir}/${srcfile} set lib1src ${srcdir}/${subdir}/${srcfile2} -- 2.35.3