From patchwork Mon Nov 7 16:13:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 60123 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 5D5F038582B9 for ; Mon, 7 Nov 2022 16:14:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D5F038582B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667837679; bh=jhiC4UHU5A4GB26ccSrUqptO6BvH80Wylp2e3MAL40I=; 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=TFqlN0nFUhO5v95RyFOvO3ykdyHbmMtHk3o73O90tECGWWslgYiiM5YLf+HqgvtCk XqVjU68iD/Hu10bdyMVP87uguI43j0mfD55U/UlTp1SEAJvrPT10S/gVRMOX4FidH4 XzbM5dsE07wjfoKyztfWIa0BPNXTBr8l7i8BPkxA= 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 583423858C3A for ; Mon, 7 Nov 2022 16:13:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 583423858C3A 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) 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 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 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 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-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 }