From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 9F44738582BC for ; Mon, 27 Mar 2023 09:36:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F44738582BC 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-out2.suse.de (Postfix) with ESMTPS id C5EC21FD6A for ; Mon, 27 Mar 2023 09:36:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1679909791; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=6bLhZx4qMOikXqr+5G/wAtW0vJvCrYAis8wl7i8627U=; b=P7g0aUGRRNTVxQbkJucCGlb6clOvE0JAkEJhj5vfh2U2F4Tm7SkBfSYfxgeFHNV3oJaBLv ednaQh9wonI607BLTCrnPJjS56/ixG9D4EONaLUjyg0vluBz6nKes3NSmKv+K+tDKSOgTR x3XD9q03rqkydVIUGTmzT29KKjlCnFM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1679909791; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=6bLhZx4qMOikXqr+5G/wAtW0vJvCrYAis8wl7i8627U=; b=ObTVR+cY6GsH25yOiMiKRNG6M4n/whVjReweHKVhL8J7uWVGr7q+W3lTMhtR43V6ZfkLlp /5BAUpvWoXpRPxDQ== 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 B1FAE13482 for ; Mon, 27 Mar 2023 09:36:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id v2v7KZ9jIWStaQAAMHmgww (envelope-from ) for ; Mon, 27 Mar 2023 09:36:31 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed 1/2] [gdb/testsuite] Remove superfluous pid in temp files Date: Mon, 27 Mar 2023 11:36:30 +0200 Message-Id: <20230327093631.15655-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.5 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: While trying to use gdb_can_simple_compile with a d program, I ran into: ... /data/vries/gdb/f37/build/gdb/testsuite/temp/105856/can_compile_d-105856.d: \ error: module 'can_compile_d-105856' has non-identifier characters in \ filename, use module declaration instead ... The d compiler has a problem with the filename can_compile_d-105856.d, which contains the pid. The pid is added by gdb_simple_compile: ... set obj [standard_temp_file $name-[pid].$postfix] ... but it's unnecessary because standard_temp_file already uses the pid. Fix this by removing "[pid]" in all calls to standard_temp_file. Tested on x86_64-linux. --- gdb/testsuite/lib/dwarf.exp | 2 +- gdb/testsuite/lib/gdb.exp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index 8b0cf77412d..434495df24a 100644 --- a/gdb/testsuite/lib/dwarf.exp +++ b/gdb/testsuite/lib/dwarf.exp @@ -294,7 +294,7 @@ proc shared_gdb_start_use { src options } { } if { $do_start } { - set exe [standard_temp_file func_addr[pid].x] + set exe [standard_temp_file func_addr.x] gdb_compile $src $exe executable $options diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 3cfe22b32cd..f8046ffe84d 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4579,8 +4579,8 @@ gdb_caching_proc universal_compile_options {} { set me "universal_compile_options" set options {} - set src [standard_temp_file ccopts[pid].c] - set obj [standard_temp_file ccopts[pid].o] + set src [standard_temp_file ccopts.c] + set obj [standard_temp_file ccopts.o] gdb_produce_source $src { int foo(void) { return 0; } @@ -4635,8 +4635,8 @@ proc gdb_simple_compile {name code {type object} {compile_flags {}} {object obj} break } } - set src [standard_temp_file $name-[pid].$ext] - set obj [standard_temp_file $name-[pid].$postfix] + set src [standard_temp_file $name.$ext] + set obj [standard_temp_file $name.$postfix] set compile_flags [concat $compile_flags {debug nowarnings quiet}] gdb_produce_source $src $code @@ -7011,8 +7011,8 @@ gdb_caching_proc allow_float_test {} { # Set up, compile, and execute a test program having VFP # operations. - set src [standard_temp_file arm_vfp[pid].c] - set exe [standard_temp_file arm_vfp[pid].x] + set src [standard_temp_file arm_vfp.c] + set exe [standard_temp_file arm_vfp.x] gdb_produce_source $src { int main() { base-commit: 324998b47364528f407666512015370c12ab83a1 -- 2.35.3