From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id cZxwGTlnZWBeIgAAWB0awg (envelope-from ) for ; Thu, 01 Apr 2021 02:24:57 -0400 Received: by simark.ca (Postfix, from userid 112) id 5ACA01EF4F; Thu, 1 Apr 2021 02:24:57 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B774F1E783 for ; Thu, 1 Apr 2021 02:24:56 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5D2E63857C75; Thu, 1 Apr 2021 06:24:56 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 0DCD23857C75 for ; Thu, 1 Apr 2021 06:24:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0DCD23857C75 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 2D414AF2A for ; Thu, 1 Apr 2021 06:24:52 +0000 (UTC) Date: Thu, 1 Apr 2021 08:24:50 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix unset of DEBUGINFOD_URLS in default_gdb_init Message-ID: <20210401062449.GA8387@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Hi, In commit cfcbd506fb0 "[gdb/testsuite] Ignore DEBUGINFOD_URLS" I added unsetting of env(DEBUGINFOD_URLS), but it doesn't work because I forgot to add :: in front. Fix this, and rewrite using "unset -nocomplain" instead of unsetenv, which allows us to drop the "info exists" test. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix unset of DEBUGINFOD_URLS in default_gdb_init 2021-04-01 Tom de Vries * lib/gdb.exp (default_gdb_init): Use ::env. Use unset -nocomplain ::env(V) instead of unsetenv V. --- gdb/testsuite/lib/gdb.exp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 3cdc39dc819..943112fcc80 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -5272,9 +5272,7 @@ proc default_gdb_init { test_file_name } { # If DEBUGINFOD_URLS is set, gdb will try to download sources and # debug info for f.i. system libraries. Prevent this. - if { [info exists env(DEBUGINFOD_URLS)] } { - unsetenv DEBUGINFOD_URLS - } + unset -nocomplain ::env(DEBUGINFOD_URLS) # Ensure that GDBHISTFILE and GDBHISTSIZE are removed from the # environment, we don't want these modifications to the history