From patchwork Mon Apr 8 06:47:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13620610 Received: from fout7-smtp.messagingengine.com (fout7-smtp.messagingengine.com [103.168.172.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 548D018C19 for ; Mon, 8 Apr 2024 06:47:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558826; cv=none; b=RwxGojrhJbvRAPIJGxMZUvhjQPHoFRnNYZ8FF/6VAWJ72G1tQwxVejSm04PuGPmVBZIAm1BiqNL3ObMatVUTlxbs0lMskfq0iENdJUt4bDXqMhR+2Jlqjrk7c5smc6La4cfYzOB3z08b713uBEoMaGLmX/noa3fJPwMFBmRDO4Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558826; c=relaxed/simple; bh=JFV/MKjdnLvBPCp1XO5nX2oRi78aS25wdfRaG+ECzgQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=vBMIn18/Hqe5qwAY733Xn1r1QWzTCcbXIbR7qDaqa06gc/6NaOVjFexRXjhMkjzUniD/wqeRP4+q/zz0lVCrIUaA8FYYQflq768/bPKWk4W7xhZYzhBZ/aW29iuEbSNeyLnmv0Aob5mry7om0+Bkv/ZAzqswjhGWj+RbnvAdShs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=c4VCPaP7; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=hvcOguXw; arc=none smtp.client-ip=103.168.172.150 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="c4VCPaP7"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="hvcOguXw" Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 9EFEC13800C6; Mon, 8 Apr 2024 02:47:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 08 Apr 2024 02:47:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1712558824; x=1712645224; bh=izJ7JLWhJ+ n9h+Qs5qguxPuKcao5C+fV8wsoVSY4xrY=; b=c4VCPaP7JlronPHNRXMOujQrWm v9tmX3ZK+CYt5BYHHIERESXCxeWHOUkvm5npLyhIxXmh/J22r8wOfK3Sxo5xKfKS JfkrcD1RsaR3CP/Ft1d5ZSWrQxX7rlSWmJR8gv1UmBN8Z1+40HW4xhf5dpwzJnRp 95eIRNQE4eCa3RAht2jseRqlviWp/q8nVRF0arUZ5+YFsaCBnBL2p6MYyHavirLV faLJt+kostgkzpNENTcBtXXujlbjILKEx5rfNdeXYONDbF3vj8STY5Yb9XJgBdnL mNEeDvCgljZwYJogHlQd871xzuly+SbB3pzWDzcjfUH4S8cGjF6PG58Haq1w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712558824; x=1712645224; bh=izJ7JLWhJ+n9h+Qs5qguxPuKcao5 C+fV8wsoVSY4xrY=; b=hvcOguXwgnM/pUVZlX5BEuV9m0Bq2Bo2iQEMMu/BLYKP snHtRuFN63rc60u6MVaxiZMNo+MUHZf3Q2MEf4P4r87qSQ9IAbgKYSWDF6UG9rzA 4rY+PhEzB8UqVkCqkMiDpfrmZjsBA3wPyKnzGUGQQgFzpJIU+OdrB8UQ6CffY526 otvynbf1U27U8Kslxt1NRnNe4n+B7QWJ6wxRLTh8dGmDsnz3R/IqDNdUCwbCuLPh 3R/BIl9TiEVOY/V9fXd1gOm8VvjlNyaVvcn3lg4I6M+L7kgLVfEk4PnYWn4E3Ppw iAq2hVn2hALsd20+R40MEVZA/mzhNNJl1YrOo37LYQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeghedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleff teenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpsh esphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Apr 2024 02:47:03 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 70dd9b4a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 8 Apr 2024 06:46:57 +0000 (UTC) Date: Mon, 8 Apr 2024 08:47:00 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , Eric Sunshine Subject: [PATCH v2 11/12] t0610: fix non-portable variable assignment Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Older versions of the Dash shell fail to parse `local var=val` assignments in some cases when `val` is unquoted. Such failures can be observed e.g. with Ubuntu 20.04 and older, which has a Dash version that still has this bug. Such an assignment has been introduced in t0610. The issue wasn't detected for a while because this test used to only run when the GIT_TEST_DEFAULT_REF_FORMAT environment variable was set to "refatble". We have dropped that requirement now though, meaning that it runs unconditionally, inclluding on jobs which use such older versions of Ubuntu. We have worked around such issues in the past, e.g. in ebee5580ca (parallel-checkout: avoid dash local bug in tests, 2021-06-06), by quoting the `val` side. Apply the same fix to t0610. Signed-off-by: Patrick Steinhardt --- t/t0610-reftable-basics.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t0610-reftable-basics.sh b/t/t0610-reftable-basics.sh index aa9282007c..dfa7e274ea 100755 --- a/t/t0610-reftable-basics.sh +++ b/t/t0610-reftable-basics.sh @@ -78,9 +78,9 @@ test_expect_success 'init: reinitializing reftable with files backend fails' ' ' test_expect_perms () { - local perms="$1" - local file="$2" - local actual=$(ls -l "$file") && + local perms="$1" && + local file="$2" && + local actual="$(ls -l "$file")" && case "$actual" in $perms*)