From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 583423858C3A for ; Mon, 7 Nov 2022 16:13:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 583423858C3A 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-out1.suse.de (Postfix) with ESMTPS id 76E122262A 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=jhiC4UHU5A4GB26ccSrUqptO6BvH80Wylp2e3MAL40I=; b=VOD9wH9tgtXsxZHNlg1887yQ/g+RxnNFPibjzakLBDGTaVw1VeeQGgbMH/GM31mRctDmuN ezC5odFZ9gv8wG2L3hQd1J6PQfHEbO7Nri1pji1rh8uLp44BIKuPdnQ8sWmevuD+Wg/gpN LpLEZnrdJXq6xRmlKgK5NJV0la6ZihQ= 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=jhiC4UHU5A4GB26ccSrUqptO6BvH80Wylp2e3MAL40I=; b=oAPlp7QLP3AHIEPZ42n3QM9YrcdmAx9TmNcfFXEsQMrD/AO3nTcR6ZIgiz7+gd77W2qLWI Rko4ONTOMP/0jrCA== 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 6409913494 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 ODRKF64uaWPsTwAAMHmgww (envelope-from ) for ; Mon, 07 Nov 2022 16:13:34 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 6/9] [gdb/testsuite] Fix gdb.base/solib-vanish.exp for remote target Date: Mon, 7 Nov 2022 17:13:30 +0100 Message-Id: <20221107161333.16999-7-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: When running test-case gdb.base/solib-vanish.exp with 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/solib-vanish.exp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.base/solib-vanish.exp b/gdb/testsuite/gdb.base/solib-vanish.exp index 5f47f2a80fd..6dfcd6f8bca 100644 --- a/gdb/testsuite/gdb.base/solib-vanish.exp +++ b/gdb/testsuite/gdb.base/solib-vanish.exp @@ -69,22 +69,31 @@ set srcfile_lib1 ${srcdir}/${subdir}/${lib1name}.c set binfile_lib1 [standard_output_file ${lib1name}.so] set lib1_flags [list debug shlib=${binfile_lib2}] +if { [gdb_compile_shlib ${srcfile_lib2} ${binfile_lib2} $lib2_flags] != "" + || [gdb_compile_shlib ${srcfile_lib1} ${binfile_lib1} $lib1_flags] != "" } { + untested "failed to compile" + return -1 +} + # Main program set testfile "solib-vanish-main" set srcfile ${srcdir}/${subdir}/${testfile}.c set executable ${testfile} set binfile [standard_output_file ${executable}] -set bin_flags [list debug shlib_load additional_flags=-DVANISH_LIB=\"${binfile_lib1}\"] +set bin_flags [list debug shlib_load] +set binfile_lib1_target [gdb_download_shlib $binfile_lib1] +lappend bin_flags additional_flags=-DVANISH_LIB=\"$binfile_lib1_target\" -if { [gdb_compile_shlib ${srcfile_lib2} ${binfile_lib2} $lib2_flags] != "" - || [gdb_compile_shlib ${srcfile_lib1} ${binfile_lib1} $lib1_flags] != "" - || [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } { +if { [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } { untested "failed to compile" return -1 } clean_restart $testfile +gdb_locate_shlib $binfile_lib1 +gdb_load_shlib $binfile_lib2 + if { ![runto_main] } { return } -- 2.35.3