From patchwork Wed Mar 22 08:38:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 66733 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A3CC93857B8E for ; Wed, 22 Mar 2023 08:40:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3CC93857B8E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679474405; bh=wd3/x8xgvJsX0+pgahrqksnk3kS2irkuTRMYx/Zbiiw=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=sqWyeiX7j5HrvgQGLyLYEKbbTqIMlgi1Dflit+xb5zyFP8P17/4FBtncW8yZJRFOO HEiQ5951I8GmDPcIOyNh9CpNhULWwToSfxkk5cUGTlmXauq9fXYK9GJ08oP04OwVpa D7qpk4ZOPaBYFK5JHjLygWG8I9z2nIpsGXj01tpA= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 76760385B506 for ; Wed, 22 Mar 2023 08:38:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 76760385B506 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 782B420B64 for ; Wed, 22 Mar 2023 08:38: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 54CB513AA3 for ; Wed, 22 Mar 2023 08:38:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ONmFE3m+GmRxRAAAMHmgww (envelope-from ) for ; Wed, 22 Mar 2023 08:38:17 +0000 To: gdb-patches@sourceware.org Subject: [pushed 1/3] [gdb/testsuite] Fix gdb.cp/*.exp for remote host Date: Wed, 22 Mar 2023 09:38:17 +0100 Message-Id: <20230322083819.14320-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230322083819.14320-1-tdevries@suse.de> References: <20230322083819.14320-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 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.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-Patchwork-Original-From: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Fix a few test-cases in gdb.cp/*.exp for remote host using new proc include_file. Tested on x86_64-linux. --- gdb/testsuite/gdb.cp/breakpoint-locs.exp | 2 ++ gdb/testsuite/gdb.cp/filename.exp | 2 ++ gdb/testsuite/gdb.cp/gdb2384.exp | 2 ++ gdb/testsuite/gdb.cp/hang.exp | 2 ++ gdb/testsuite/gdb.cp/m-static.exp | 8 +++++++- gdb/testsuite/gdb.cp/mb-inline.exp | 1 + gdb/testsuite/gdb.cp/minsym-fallback.exp | 3 +++ gdb/testsuite/gdb.cp/ovsrch.exp | 2 ++ gdb/testsuite/gdb.cp/pr10728.exp | 2 ++ gdb/testsuite/gdb.cp/rtti.exp | 2 ++ gdb/testsuite/gdb.cp/stub-array-size.exp | 2 ++ gdb/testsuite/gdb.cp/subtypes.exp | 2 ++ gdb/testsuite/lib/gdb.exp | 12 ++++++++++++ 13 files changed, 41 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.cp/breakpoint-locs.exp b/gdb/testsuite/gdb.cp/breakpoint-locs.exp index 0d1ad68f9f5..11192654a35 100644 --- a/gdb/testsuite/gdb.cp/breakpoint-locs.exp +++ b/gdb/testsuite/gdb.cp/breakpoint-locs.exp @@ -19,6 +19,8 @@ require allow_cplus_tests standard_testfile .cc breakpoint-locs-2.cc +include_file breakpoint-locs.h + if { [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2"\ {debug c++}] } { return -1 diff --git a/gdb/testsuite/gdb.cp/filename.exp b/gdb/testsuite/gdb.cp/filename.exp index 9b1d2b8a606..2eddb9b7982 100644 --- a/gdb/testsuite/gdb.cp/filename.exp +++ b/gdb/testsuite/gdb.cp/filename.exp @@ -17,6 +17,8 @@ require allow_cplus_tests standard_testfile .cc +include_file includefile + if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { return -1 } diff --git a/gdb/testsuite/gdb.cp/gdb2384.exp b/gdb/testsuite/gdb.cp/gdb2384.exp index 46d93d27e7b..7c6b27fd8db 100644 --- a/gdb/testsuite/gdb.cp/gdb2384.exp +++ b/gdb/testsuite/gdb.cp/gdb2384.exp @@ -25,6 +25,8 @@ require allow_cplus_tests allow_shlib_tests standard_testfile .cc gdb2384-base.cc +include_file gdb2384-base.h + set sofile [standard_output_file gdb2384-base.so] if { [gdb_compile_shlib $srcdir/$subdir/$srcfile2 $sofile {debug c++}] != "" diff --git a/gdb/testsuite/gdb.cp/hang.exp b/gdb/testsuite/gdb.cp/hang.exp index 7d8588520ec..71ab5c7a63b 100644 --- a/gdb/testsuite/gdb.cp/hang.exp +++ b/gdb/testsuite/gdb.cp/hang.exp @@ -18,6 +18,8 @@ require allow_cplus_tests standard_testfile hang1.cc hang2.cc hang3.cc +include_file hang.H + if {[prepare_for_testing "failed to prepare" $testfile \ [list $srcfile $srcfile2 $srcfile3] {debug c++}]} { return -1 diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp index 56c4cdad95e..419d772e28e 100644 --- a/gdb/testsuite/gdb.cp/m-static.exp +++ b/gdb/testsuite/gdb.cp/m-static.exp @@ -27,6 +27,8 @@ require allow_cplus_tests standard_testfile .cc m-static1.cc +include_file m-static.h + set flags [list debug c++] if { [test_compiler_info gcc-*] && [gcc_major_version] >= 10 } { # Work around PR gcc/101452. @@ -181,7 +183,11 @@ gdb_test "print test4.somewhere" "\\$\[0-9\].* = 3.14\[0-9\]*" "static const flo # Also make sure static const members can be found via "info var". if { $non_dwarf } { setup_xfail *-*-* } -gdb_test "info variable everywhere" "File .*/m-static\[.\]h.*const int gnu_obj_4::everywhere;" +gdb_test "info variable everywhere" \ + [multi_line \ + "File (.*/)?m-static\[.\]h:" \ + "$decimal:\tconst int gnu_obj_4::everywhere;" \ + ".*"] # Perhaps at some point test4 should also include a test for a static # const int that was initialized in the header file. But I'm not sure diff --git a/gdb/testsuite/gdb.cp/mb-inline.exp b/gdb/testsuite/gdb.cp/mb-inline.exp index 555827806f7..9793b14c073 100644 --- a/gdb/testsuite/gdb.cp/mb-inline.exp +++ b/gdb/testsuite/gdb.cp/mb-inline.exp @@ -22,6 +22,7 @@ require allow_cplus_tests standard_testfile mb-inline1.cc mb-inline2.cc set hdrfile "${testfile}.h" +include_file $hdrfile if {[prepare_for_testing "failed to prepare" $testfile \ [list $srcfile $srcfile2] {debug c++}]} { diff --git a/gdb/testsuite/gdb.cp/minsym-fallback.exp b/gdb/testsuite/gdb.cp/minsym-fallback.exp index 56a56a3da6b..a3bfe56bec6 100644 --- a/gdb/testsuite/gdb.cp/minsym-fallback.exp +++ b/gdb/testsuite/gdb.cp/minsym-fallback.exp @@ -18,6 +18,9 @@ # a different file providing only ELF symbols. standard_testfile .cc minsym-fallback-main.cc + +include_file minsym-fallback.h + set executable $testfile set objfile [standard_output_file ${testfile}.o] set objmainfile [standard_output_file ${testfile}-main.o] diff --git a/gdb/testsuite/gdb.cp/ovsrch.exp b/gdb/testsuite/gdb.cp/ovsrch.exp index 31a8abf7793..39e022c6676 100644 --- a/gdb/testsuite/gdb.cp/ovsrch.exp +++ b/gdb/testsuite/gdb.cp/ovsrch.exp @@ -57,6 +57,8 @@ require allow_cplus_tests # Test for c++/11734 standard_testfile ovsrch1.cc ovsrch2.cc ovsrch3.cc ovsrch4.cc +include_file ovsrch.h + if {[prepare_for_testing "failed to prepare" $testfile \ [list $srcfile $srcfile2 $srcfile3 $srcfile4] {c++ debug}]} { return -1 diff --git a/gdb/testsuite/gdb.cp/pr10728.exp b/gdb/testsuite/gdb.cp/pr10728.exp index b860fb7c3ae..ea9c1242725 100644 --- a/gdb/testsuite/gdb.cp/pr10728.exp +++ b/gdb/testsuite/gdb.cp/pr10728.exp @@ -22,6 +22,8 @@ require allow_cplus_tests load_lib "cp-support.exp" standard_testfile pr10728-x.cc pr10728-y.cc +include_file pr10728-x.h + set tfx [standard_output_file pr10728-x.o] set tfy [standard_output_file pr10728-y.o] diff --git a/gdb/testsuite/gdb.cp/rtti.exp b/gdb/testsuite/gdb.cp/rtti.exp index 8ad7683ee40..18dfaf0c2bd 100644 --- a/gdb/testsuite/gdb.cp/rtti.exp +++ b/gdb/testsuite/gdb.cp/rtti.exp @@ -34,6 +34,8 @@ require allow_cplus_tests standard_testfile rtti1.cc rtti2.cc +include_file rtti.h + if {[prepare_for_testing "failed to prepare" $testfile \ [list $srcfile $srcfile2] {debug c++}]} { return -1 diff --git a/gdb/testsuite/gdb.cp/stub-array-size.exp b/gdb/testsuite/gdb.cp/stub-array-size.exp index 0afe232d583..7757db20af9 100644 --- a/gdb/testsuite/gdb.cp/stub-array-size.exp +++ b/gdb/testsuite/gdb.cp/stub-array-size.exp @@ -22,6 +22,8 @@ require allow_cplus_tests standard_testfile .cc stub-array-size2.cc +include_file stub-array-size.h + if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \ {c++ debug}]} { return -1 diff --git a/gdb/testsuite/gdb.cp/subtypes.exp b/gdb/testsuite/gdb.cp/subtypes.exp index f5cf349cc26..afad478cba3 100644 --- a/gdb/testsuite/gdb.cp/subtypes.exp +++ b/gdb/testsuite/gdb.cp/subtypes.exp @@ -22,6 +22,8 @@ load_lib "cp-support.exp" standard_testfile .cc subtypes-2.cc +include_file subtypes.h + if {[prepare_for_testing "failed to prepare" $testfile \ [list $srcfile $srcfile2] \ {debug c++ additional_flags=-std=c++11}]} { diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 0a0ae697d1e..24fcb8f1746 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -9554,6 +9554,18 @@ gdb_caching_proc have_compile_flag { flag } { additional_flags=$flag] } +# Handle include file $srcdir/$subdir/FILE. + +proc include_file { file } { + set file [file join $::srcdir $::subdir $file] + if { [is_remote host] } { + set res [remote_download host $file] + } else { + set res $file + } + + return $res +} # Handle include file FILE, and if necessary update compiler flags variable # FLAGS. From patchwork Wed Mar 22 08:38:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 66731 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A21DE385B513 for ; Wed, 22 Mar 2023 08:38:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A21DE385B513 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679474329; bh=SVRhh5ug2/SI3hBTzyY5dCPy1PgeXY0gHcXGkWrpbwY=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=RwVAjld8rpsic7XIP10zMmaXD12TgrQBNBEAC2TQeP8KrnjqsP+NmhiKGAGujIYWH 4efSWnkGRfNrspoMGaYYVmN249HTkoFjOF7W6bP+Z6tWZUEo7FfmzHY0ejrx7Kdd9m OSOkEAcrzweD1ctcVDwZFRLXhi73PSg13VKKFCPQ= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 78CF93858C66 for ; Wed, 22 Mar 2023 08:38:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 78CF93858C66 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 8752122702 for ; Wed, 22 Mar 2023 08:38: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 72454138E9 for ; Wed, 22 Mar 2023 08:38:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id YKunGnm+GmRxRAAAMHmgww (envelope-from ) for ; Wed, 22 Mar 2023 08:38:17 +0000 To: gdb-patches@sourceware.org Subject: [pushed 2/3] [gdb/testsuite] Fix gdb.cp/annota{2, 3}.exp for native-extended-gdbserver Date: Wed, 22 Mar 2023 09:38:18 +0100 Message-Id: <20230322083819.14320-3-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230322083819.14320-1-tdevries@suse.de> References: <20230322083819.14320-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 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.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-Patchwork-Original-From: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" When running test-cases gdb.cp/annota{2,3}.exp with target board native-extended-gdbserver, we run into a few FAILs, due to the test-cases trying to match inferior output together with gdb output. Fix this by ignoring the inferior output in this case. Tested on x86_64-linux. --- gdb/testsuite/gdb.cp/annota2.exp | 15 +++++++++++++-- gdb/testsuite/gdb.cp/annota3.exp | 25 +++++++++++++++++-------- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp index 64adbbdb220..506817bd498 100644 --- a/gdb/testsuite/gdb.cp/annota2.exp +++ b/gdb/testsuite/gdb.cp/annota2.exp @@ -126,13 +126,24 @@ gdb_test_multiple "print a" "print class" { # `a.x is 1' is asynchronous regarding to `frames-invalid'. # +if { $gdb_spawn_id == $inferior_spawn_id } { + set match_output \ + [multi_line \ + "\($frames_invalid\)*a.x is 1" \ + "\($frames_invalid\)*"] +} else { + # Usually we'd handle this using gdb_test_stdio, but that looks too + # complicated in combination with annotations, so just ignore the inferior + # output. + set match_output "\($frames_invalid\)*" +} + set pat [multi_line "" \ "\032\032post-prompt" \ "Continuing." \ "" \ "\032\032starting" \ - "\(${frames_invalid}\)*a.x is 1" \ - "\(${frames_invalid}\)*"\ + $match_output \ "\032\032exited 0" \ "$inferior_exited_re normally." \ "" \ diff --git a/gdb/testsuite/gdb.cp/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp index 788bda77f3d..7b85c84cd97 100644 --- a/gdb/testsuite/gdb.cp/annota3.exp +++ b/gdb/testsuite/gdb.cp/annota3.exp @@ -95,14 +95,23 @@ gdb_expect_list "print class" "$gdb_prompt$" { # annotate-exited # send_gdb "continue\n" -gdb_expect_list "continue to exit" "$gdb_prompt$" [concat { - "\r\n\032\032post-prompt\r\n" - "Continuing.\r\n" - "\r\n\032\032starting\r\n" - "a.x is 1\r\n" - "\r\n\032\032exited 0\r\n"} [list "$inferior_exited_re normally.\r\n"] { - "\r\n\032\032stopped\r\n" -}] + +set el {} +lappend el "\r\n\032\032post-prompt\r\n" +lappend el "Continuing.\r\n" +lappend el "\r\n\032\032starting\r\n" +if { $gdb_spawn_id == $inferior_spawn_id } { + lappend el "a.x is 1\r\n" +} else { + # Usually we'd handle this using gdb_test_stdio, but that looks too + # complicated in combination with annotations, so just ignore the inferior + # output. +} +lappend el "\r\n\032\032exited 0\r\n" +lappend el "$inferior_exited_re normally.\r\n" +lappend el "\r\n\032\032stopped\r\n" + +gdb_expect_list "continue to exit" "$gdb_prompt$" $el # # delete all breakpoints From patchwork Wed Mar 22 08:38:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 66732 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 90EBB385087A for ; Wed, 22 Mar 2023 08:39:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 90EBB385087A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679474372; bh=2ORtglWa7gmEeN5k2v6by2pD7C9Meebcr8uFNvcRS8w=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=pvNN5q5cOlRPK6hua3tGoxAa1C9Qc/gPET26LJny5rQfpgPkPLNPM9YtayA+68oTQ BbmOJIAAzPk9cAX6fhLS1/W65TymYCtO3tOEVNELp5NREC4lrUtu4IcRbgOt5OZSsq BznImVZe7oIuT6IOvYTuk1taWXxZjtID5wH7jtts= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 7C7DB3858433 for ; Wed, 22 Mar 2023 08:38:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7C7DB3858433 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 AD6C720B65 for ; Wed, 22 Mar 2023 08:38: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 8B9AC13AA3 for ; Wed, 22 Mar 2023 08:38:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gKfkIHm+GmRxRAAAMHmgww (envelope-from ) for ; Wed, 22 Mar 2023 08:38:17 +0000 To: gdb-patches@sourceware.org Subject: [pushed 3/3] [gdb/testsuite] Fix gdb.cp/cp-relocate.exp for remote host Date: Wed, 22 Mar 2023 09:38:19 +0100 Message-Id: <20230322083819.14320-4-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230322083819.14320-1-tdevries@suse.de> References: <20230322083819.14320-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 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.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-Patchwork-Original-From: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Fix test-case gdb.cp/cp-relocate.exp for remote host using gdb_remote_download. Tested on x86_64-linux. --- gdb/testsuite/gdb.cp/cp-relocate.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.cp/cp-relocate.exp b/gdb/testsuite/gdb.cp/cp-relocate.exp index d400bb14e46..25ed15a9aa1 100644 --- a/gdb/testsuite/gdb.cp/cp-relocate.exp +++ b/gdb/testsuite/gdb.cp/cp-relocate.exp @@ -118,7 +118,9 @@ if { $func1_sec == $func2_sec } { # Now start a clean GDB, for add-symbol-file tests. clean_restart -gdb_test "add-symbol-file ${binfile} 0 -s ${func1_sec} 0x10000 -s ${func2_sec} 0x20000" \ +set host_binfile [gdb_remote_download host $binfile] + +gdb_test "add-symbol-file $host_binfile 0 -s ${func1_sec} 0x10000 -s ${func2_sec} 0x20000" \ "Reading symbols from .*${testfile}\\.o\\.\\.\\.(|\r\nUsing host libthread_db library .*libthread_db.so.*\\.)" \ "add-symbol-file ${testfile}.o" \ "add symbol table from file \".*${testfile}\\.o\" at.*\\(y or n\\) " \