From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id DD0E93858D35 for ; Thu, 17 Aug 2023 13:47:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DD0E93858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692280024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b9WQ30yO6ZuSLhLObUsIIr7l3ySKrHty0wyw+Et/If8=; b=EpVvV/Y9lPS7X/rdezBxKwxifg+3P61ug3mgV/nJpDhanTpoCtMjRZeSnTP25fMZbZUlku lj3d325Ji/Z4jotSonpMXDxwX0zd3rOfHCcby7EBr3gsWh3htipEg14yUcAnK9gmCbBYsh RXFXGQokCx6l8soBS9vpR+Rt+r9dpsE= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-119-LspAA7xjPTmIUj_00Sjk4Q-1; Thu, 17 Aug 2023 09:47:03 -0400 X-MC-Unique: LspAA7xjPTmIUj_00Sjk4Q-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3f41a04a297so50770065e9.3 for ; Thu, 17 Aug 2023 06:47:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692280022; x=1692884822; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=b9WQ30yO6ZuSLhLObUsIIr7l3ySKrHty0wyw+Et/If8=; b=OiniOuH3BwfExTJUuk3Wz4KegL9nO/0DKVrIUTZ/wo98sXir8ulHjPkrKOea9NLwhs EkyHPWSWkuVeBPy3vE6JO+cf4DyfXuWKdjc9BeOqo5sMLWip6OmMKYGCZOLCjCUl1zFL ZHTOwXp26NJvdeOgINzJdsLrwf5vNhJwMWi/Zudj42ge3TWJwiTT9H+S3Nfw+rFiUCzb BsfCnO13nsOXTb0intpxlNn8EnklBgplhFoXmCNBnuduF/rlF1KLkwPJEU/Io/1kLRwv AtFATQ8Mk7Xx7zLYq/JOmeLGcd1Bq+bLxq45gqWrpQWONZA5+2Q+eNoQKG034vzUTX6j vb+w== X-Gm-Message-State: AOJu0YxpNlW/AKZENVdvxU17MgBGhlgBw+Ad5aQIlUBojvlOwAAcq5JP 5hhypjich6wVjl3U/NwroVEhJz4L3WoUmLJrJLxBujieVvAcglTO/NJbEs84phzfLI3xSwiFNpf 2/IeFsqn591AQNSCK5Qz8USZH296pqg== X-Received: by 2002:a7b:c00f:0:b0:3fd:3049:9496 with SMTP id c15-20020a7bc00f000000b003fd30499496mr3841590wmb.33.1692280021894; Thu, 17 Aug 2023 06:47:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHm3o9h9HJJuIkBNa9ctDli/2Vq0GqUzXdYSEJzKniBd5BYFAwTMtkP8a44wbZ98nIOcINMDg== X-Received: by 2002:a7b:c00f:0:b0:3fd:3049:9496 with SMTP id c15-20020a7bc00f000000b003fd30499496mr3841574wmb.33.1692280021526; Thu, 17 Aug 2023 06:47:01 -0700 (PDT) Received: from localhost ([31.111.84.232]) by smtp.gmail.com with ESMTPSA id hn40-20020a05600ca3a800b003fe61c33df5sm3125830wmb.3.2023.08.17.06.47.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Aug 2023 06:47:01 -0700 (PDT) From: Andrew Burgess To: Tom de Vries , gdb-patches@sourceware.org Subject: Re: [PATCH] [gdb/testsuite] Fix copy-to-remote in gdb.base/vfork-follow-parent.exp In-Reply-To: <20230817082154.23729-1-tdevries@suse.de> References: <20230817082154.23729-1-tdevries@suse.de> Date: Thu, 17 Aug 2023 14:47:00 +0100 Message-ID: <87wmxtbx2j.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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: Tom de Vries via Gdb-patches writes: > When running test-case gdb.base/vfork-follow-parent.exp, I run into: > ... > ERROR: tcl error sourcing gdb/testsuite/gdb.base/vfork-follow-parent.exp. > ERROR: error copying "vforked-prog": no such file or directory > while executing > "file copy -force $fromfile $tofile" > (procedure "gdb_remote_download" line 29) > invoked from within > "gdb_remote_download target $binfile3" > ... I'd love to know how I managed to have this passing. I guess I must have manged to get a vforked-prog binary in the wrong directory somehow. > > Fix this by: > - making the copy-to-remote conditional on is_remote target, and > - allowing gdb_remote_download to find $binfile3 by using > standard_output_file. > > Also remove unused variable remote_exec_prog. > > Tested on x86_64-linux. > --- > gdb/testsuite/gdb.base/vfork-follow-parent.exp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.base/vfork-follow-parent.exp b/gdb/testsuite/gdb.base/vfork-follow-parent.exp > index 70b54e729a5..a29706f58c5 100644 > --- a/gdb/testsuite/gdb.base/vfork-follow-parent.exp > +++ b/gdb/testsuite/gdb.base/vfork-follow-parent.exp > @@ -30,7 +30,9 @@ if { [build_executable "compile $binfile3" $binfile3 $srcfile2] } { > return -1 > } > > -set remote_exec_prog [gdb_remote_download target $binfile3] > +if { [is_remote target] } { > + gdb_remote_download target [standard_output_file $binfile3] > +} The is_remote check is unnecessary. It's the addition of standard_output_file that fixes the problem. The gdb_remote_download proc already has an is_remote check, and if not remote it just copies the file to the standard_output_file directory. Which, in this case, is where the file started, so is a no-op. Thanks for fixing this. Andrew > > set opts [list debug additional_flags=-DTEST_EXIT] > if { [build_executable "compile ${binfile}" ${binfile} ${srcfile} ${opts}] } { > > base-commit: 3afe50fe1974f9a13326a31696f5a93371ed00b7 > -- > 2.35.3