From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oDZNO0OYtl4BLQAA0tVLHw (envelope-from ) for ; Sat, 09 May 2020 11:47:15 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id gNyqAlGYtl7IUQAA1q6Kng (envelope-from ) for ; Sat, 09 May 2020 11:47:29 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4BE1E9402A0 for ; Sat, 9 May 2020 11:47:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 1309D6DE0F72; Sat, 9 May 2020 04:47:21 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mh-DYg2yVHU7; Sat, 9 May 2020 04:47:20 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id 13F2B6DE0C7A; Sat, 9 May 2020 04:47:20 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id B1D666DE0C7A for ; Sat, 9 May 2020 04:47:18 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0eJhuBmHTiGH for ; Sat, 9 May 2020 04:47:17 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id C510D6DE0ABE for ; Sat, 9 May 2020 04:47:17 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.92) (envelope-from ) id 1jXNwl-0004UQ-VC; Sat, 09 May 2020 07:47:11 -0400 Received: (nullmailer pid 1132924 invoked by uid 1000); Sat, 09 May 2020 11:47:10 -0000 From: David Bremner To: Daniel Kahn Gillmor , Notmuch Mail Subject: Re: [PATCH 1/2 v2] test-lib: mark function variables as local In-Reply-To: <20200508232438.169867-1-dkg@fifthhorseman.net> References: <20200506235438.100518-1-dkg@fifthhorseman.net> <20200508232438.169867-1-dkg@fifthhorseman.net> X-List-To: notmuch Date: Sat, 09 May 2020 08:47:10 -0300 Message-ID: <87r1vtib41.fsf@tethera.net> MIME-Version: 1.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomi Ollila Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 X-Spam-Score: -1.01 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Scan-Result: default: False [-1.01 / 13.00]; ARC_NA(0.00)[]; GENERIC_REPUTATION(0.00)[-0.45426256336145]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+a:c]; IP_REPUTATION_HAM(0.00)[asn: 27017(-0.18), country: US(-0.00), ip: 50.126.95.6(-0.45)]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[notmuch@notmuchmail.org]; DMARC_NA(0.00)[tethera.net]; HAS_LIST_UNSUB(-0.01)[]; FORGED_SENDER_MAILLIST(0.00)[]; URIBL_BLOCKED(0.00)[test-lib.sh:url,tldp.org:url,fifthhorseman.net:email,notmuchmail.org:email]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.50)[cached: notmuchmail.org]; DWL_DNSWL_BLOCKED(0.00)[50.126.95.6:from]; MAILLIST(-0.20)[mailman]; RCVD_IN_DNSWL_FAIL(0.00)[50.126.95.6:server fail]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:27017, ipnet:50.126.64.0/18, country:US]; FROM_NEQ_ENVFROM(0.00)[david@tethera.net,notmuch-bounces@notmuchmail.org]; RCVD_COUNT_SEVEN(0.00)[8] X-TUID: mC9vI/d9lI0z Daniel Kahn Gillmor writes: > Several functions in test/test-lib.sh used variable names that are > also used outside of those functions (e.g. $output and $expected are > used in many of the test scripts), but they are not expected to > communicate via those variables. > > We mark those variables "local" within test-lib.sh so that they do not > get clobbered when used outside test-lib. > > We also move the local variable declarations to beginning of each > function, to avoid weird gotchas with local variable declarations as > described in https://tldp.org/LDP/abs/html/localvar.html. Pushed this one to master. I'm confused about where to apply 2/2. If I apply it on top of (updated) master, it causes test failures. If I apply after the rest of the patches in this thread then presumably there is some interval where the build is broken (if only for certain GMime versions). d