From patchwork Mon Nov 7 16:13:25 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: 60118 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 D2FF93858432 for ; Mon, 7 Nov 2022 16:14:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2FF93858432 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667837643; bh=fviF6b8QimUrS6TFvfJtpQZaYfu9kp+Swp3foq2PhkM=; 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=KIiYmH2hhZSvwTz8U+27KfL73uSVrRPRtqBbPWpDJese6oD15olNrJXIz9muO4jbZ d0ELf3TDOdou+XDrAWgPR5JukCc9JFwF/qpzxwrYxaPFjoCb+j66FSr/lKwkmW15CA haSiKY0LNTVm2mDpMYOqoGKfpDmfWxpPPbTJlcVg= 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 B73F73858D28 for ; Mon, 7 Nov 2022 16:13:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B73F73858D28 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 F268922562 for ; Mon, 7 Nov 2022 16:13:33 +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 DFDBD13494 for ; Mon, 7 Nov 2022 16:13:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id WIKQNa0uaWPsTwAAMHmgww (envelope-from ) for ; Mon, 07 Nov 2022 16:13:33 +0000 To: gdb-patches@sourceware.org Subject: [PATCH 1/9] [gdb/testsuite] Fix gdb.base/foll-exec.exp for remote target Date: Mon, 7 Nov 2022 17:13:25 +0100 Message-Id: <20221107161333.16999-2-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/foll-exec.exp with target board remote-gdbserver-on-localhost.exp, I run into: ... (gdb) PASS: gdb.base/foll-exec.exp: insert first exec catchpoint continue^M Continuing.^M [Inferior 1 (process 4476) exited normally]^M (gdb) FAIL: gdb.base/foll-exec.exp: continue to first exec catchpoint (the program e\ xited) ... The problem is that the foll-exec executable expects the exec-ed executable execd-prog alongside it, but it's missing. Fix this by adding the missing gdb_remote_download. Likewise in a few other test-cases. Tested on x86_64-linux. --- gdb/testsuite/gdb.base/exec-invalid-sysroot.exp | 4 ++++ gdb/testsuite/gdb.base/foll-exec.exp | 4 ++++ gdb/testsuite/gdb.base/foll-vfork.exp | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp b/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp index cacd5a092a2..7f7599cbf86 100644 --- a/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp +++ b/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp @@ -33,6 +33,10 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable $c return -1 } +if { [is_remote target] } { + gdb_remote_download target $binfile2 +} + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $compile_options] != "" } { untested "failed to compile main testcase" return -1 diff --git a/gdb/testsuite/gdb.base/foll-exec.exp b/gdb/testsuite/gdb.base/foll-exec.exp index 8cddfa52c3b..a3d1a8781e9 100644 --- a/gdb/testsuite/gdb.base/foll-exec.exp +++ b/gdb/testsuite/gdb.base/foll-exec.exp @@ -36,6 +36,10 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable $c return -1 } +if { [is_remote target] } { + gdb_remote_download target $binfile2 +} + if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $compile_options] != "" } { untested "failed to compile" return -1 diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp index e4f75728600..9627a177896 100644 --- a/gdb/testsuite/gdb.base/foll-vfork.exp +++ b/gdb/testsuite/gdb.base/foll-vfork.exp @@ -42,6 +42,10 @@ if {[build_executable $testfile.exp $testfile2 $srcfile2 $compile_options] == -1 return -1 } +if { [is_remote target] } { + gdb_remote_download target [standard_output_file $testfile2] +} + # A few of these tests require a little more time than the standard # timeout allows. set oldtimeout $timeout