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 5C4C13858C55 for ; Mon, 7 Nov 2022 16:13:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5C4C13858C55 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de 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 8FB9E1F889 for ; Mon, 7 Nov 2022 16:13:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1667837614; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RLgLVFHlrF1qRgnbqsQTWTfsajrrnTAk3g4y1fkSOaw=; b=AdKR0RBgrisPMv/dJ+jxQ0k4KgfnOV68d2aqjyVU7cdBwXYYKe+fHM0j0uw85tpmXJ6wG7 dV6cWSkn9W6Ymun/LK4rjDvzIyJC6iRMbddOrT/2PusjRMGCouLgoCLNeuC5ltwBa+KtSm KSdM/wIyu0RGb6vUVS+m6gMWzq4KN1s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1667837614; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RLgLVFHlrF1qRgnbqsQTWTfsajrrnTAk3g4y1fkSOaw=; b=y/Gd6TH7474aH21RSuJZrZXwMyPANM4LVDGJtGYTgM7Ww3YGtl72mIFclBFzLs11GhI8Gx r4HWP8OrD4LaBzBg== 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 7BA4B13494 for ; Mon, 7 Nov 2022 16:13:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id UDYlHa4uaWPsTwAAMHmgww (envelope-from ) for ; Mon, 07 Nov 2022 16:13:34 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 7/9] [gdb/testsuite] Fix gdb.base/info-shared.exp for remote target Date: Mon, 7 Nov 2022 17:13:31 +0100 Message-Id: <20221107161333.16999-8-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221107161333.16999-1-tdevries@suse.de> References: <20221107161333.16999-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,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 List-Id: With test-case gdb.base/info-shared.exp and target board remote-gdbserver-on-localhost (using REMOTE_TARGET_USERNAME) we run into some failures. Fix these by adding the missing gdb_load_shlib. Tested on x86_64-linux. Co-Authored-by: Ivan Tetyushkin --- gdb/testsuite/gdb.base/info-shared.exp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/info-shared.exp b/gdb/testsuite/gdb.base/info-shared.exp index 290ae5793dc..8d3484b186c 100644 --- a/gdb/testsuite/gdb.base/info-shared.exp +++ b/gdb/testsuite/gdb.base/info-shared.exp @@ -22,12 +22,10 @@ standard_testfile set lib1name $testfile-solib1 set srcfile_lib1 $srcdir/$subdir/$lib1name.c set binfile_lib1 [standard_output_file $lib1name.so] -set define1 -DSHLIB1_NAME=\"$binfile_lib1\" set lib2name $testfile-solib2 set srcfile_lib2 $srcdir/$subdir/$lib2name.c set binfile_lib2 [standard_output_file $lib2name.so] -set define2 -DSHLIB2_NAME=\"$binfile_lib2\" if { [gdb_compile_shlib $srcfile_lib1 $binfile_lib1 {}] != "" } { untested "failed to compile shared library 1" @@ -39,12 +37,21 @@ if { [gdb_compile_shlib $srcfile_lib2 $binfile_lib2 {}] != "" } { return -1 } +set binfile_lib1_target [gdb_download_shlib $binfile_lib1] +set binfile_lib2_target [gdb_download_shlib $binfile_lib2] + +set define2 -DSHLIB2_NAME=\"$binfile_lib2_target\" +set define1 -DSHLIB1_NAME=\"$binfile_lib1_target\" + set cflags "$define1 $define2" if { [prepare_for_testing "failed to prepare" $testfile $srcfile \ [list additional_flags=$cflags shlib_load]] } { return -1 } +gdb_locate_shlib $binfile_lib1 +gdb_locate_shlib $binfile_lib2 + # Run "info sharedlibrary" and check for the presence or absence of # our libraries. proc check_info_shared { test expect1 expect2 } { -- 2.35.3