From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 9E7263857C6E for ; Tue, 21 Jul 2020 21:41:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9E7263857C6E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Sandra_Loosemore@mentor.com IronPort-SDR: lg8sWZoschsh1wQ6J6w6SUUTh3YQhf689rSfFVY+p2kIShIhpLzJ35kD/pKzl/kp8eKBvaGYei ng9Z2K8hrQCoRAtLNkmGtLONa9k3JtV5FwDfm1PlCChbguFUSNPr7X2PhzSkpqh7Zb4WnBo9Wi UXgpKfSgRxI2G9ON3agwZ47PkcPKfRachIjztObI+Tawr/Lec7DGBdqc2MbVZGhzBZ1FFPKtWh M6Bg0HnYiKFesL8KGmxzsl6G1Xd6vzwGnRVRzCOWpnfqYn6X8qGkdkwjTaCw3c3wXzIMWUVCMX tew= X-IronPort-AV: E=Sophos;i="5.75,380,1589270400"; d="scan'208";a="51165136" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 21 Jul 2020 13:41:51 -0800 IronPort-SDR: oqTk8aWM9/m6PfamuvxWuuxBYoN7JuLragQpq3PfhhyyJqwLFxL61rbxomCL9r3UnQYNZUa8vv ygdojqXGrZkRRKbq+nX3fZfGGSGh6Y7gFIV8LYyaWPo/QBigxCgS/QY9Bxs7+OAsQ75gI3cxqc 3W7bYEQbb07OxIo5EpXkhPaLaAm7pScYK/sdVbk1ZEoBvDIx6FGWmqXaA6xqObjhqiEYDkdTQf 950P0cvYwCxm5A75lsPtNOV8r5XrZb9gQqhlgvKZcUtmTT/EOQ5tr7hCDuYFpCCujwbNjCHbGE tTY= Subject: Re: [patch] gdb/testsuite: Fix more bugs in gdb testglue wrapper handling To: Tom Tromey CC: "gdb-patches@sourceware.org" References: <877duwhh2i.fsf@tromey.com> From: Sandra Loosemore Message-ID: Date: Tue, 21 Jul 2020 15:41:44 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <877duwhh2i.fsf@tromey.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SVR-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-List-Received-Date: Tue, 21 Jul 2020 21:41:54 -0000 On 7/21/20 12:13 PM, Tom Tromey wrote: >>>>>> "Sandra" == Sandra Loosemore writes: > > Sandra> if {[target_info exists needs_status_wrapper] && \ > Sandra> [target_info needs_status_wrapper] != "0"} { > Sandra> - set result [build_wrapper [standard_output_file "testglue.o"]] > Sandra> + set result [build_wrapper "testglue.o"] > Sandra> if { $result != "" } { > Sandra> set gdb_wrapper_file [lindex $result 0] > Sandra> + if ![is_remote host] { > Sandra> + set gdb_wrapper_file [file join [pwd] $gdb_wrapper_file] > > If "make -j check" is used, isn't it possible that multiple runs will > use the same file name and then clash? Well, the first part of this patch hunk is undoing an incorrect change from commit 24ac169ac5a918cd82b7485935f0c40a094c625e -- incorrect because standard_output_file returns a pathname relative to build, which cannot generally work on remote host. Things were apparently working fine for years up until February. :-S The second part is just the usual idiom to convert a relative pathname to absolute in TCL, so that we can refer to it correctly when [pwd] is something else. That was actually the problem the previous commit was trying to fix (incorrectly, by trying to rebuild the wrapper in [pwd], and leaving the .o files polluting the source directory in some cases). -Sandra