🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #1856

[GSoC PATCH] t5402: use test_path_* helpers instead of test -e and test -f

#1856
From: Tilak Kumar
Date: Thu, 29 Oct 2026 20:00
41 lines
11773 bytes
Use test_path_exists and test_path_is_missing instead of "test -e"
and "! test -f" in the post-merge hook tests, so that a failure
reports which path was unexpectedly missing or present instead of
failing silently.

Signed-off-by: Tilak Kumar <raaztilak07@gmail.com>
---
 t/t5402-post-merge-hook.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t5402-post-merge-hook.sh b/t/t5402-post-merge-hook.sh
index c77aa56421..1e222ac28f 100755
--- a/t/t5402-post-merge-hook.sh
+++ b/t/t5402-post-merge-hook.sh
@@ -37,12 +37,12 @@ test_expect_success 'setup clone hooks' '
 
 test_expect_success 'post-merge does not run for up-to-date ' '
 	GIT_DIR=clone1/.git git merge $commit0 &&
-	! test -f clone1/.git/post-merge.args
+	test_path_is_missing clone1/.git/post-merge.args
 '
 
 test_expect_success 'post-merge runs as expected ' '
 	GIT_DIR=clone1/.git git merge $commit1 &&
-	test -e clone1/.git/post-merge.args
+	test_path_exists clone1/.git/post-merge.args
 '
 
 test_expect_success 'post-merge from normal merge receives the right argument ' '
@@ -51,7 +51,7 @@ test_expect_success 'post-merge from normal merge receives the right argument '
 
 test_expect_success 'post-merge from squash merge runs as expected ' '
 	GIT_DIR=clone2/.git git merge --squash $commit1 &&
-	test -e clone2/.git/post-merge.args
+	test_path_exists clone2/.git/post-merge.args
 '
 
 test_expect_success 'post-merge from squash merge receives the right argument ' '
-- 
2.55.0
Technical Details
Message-ID: <20261029200024.32206-1-raaztilak07@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73810-linux-kernel-git=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73810-linux-kernel-git=dewy.ru
From: raaztilak07@gmail.com (Tilak Kumar)
Newsgroups: linux.kernel.git
Subject: [GSoC PATCH] t5402: use test_path_* helpers instead of test -e and test -f
Date: Fri, 30 Oct 2026 01:30:24 +0530
Organization: Usenet Network
Message-ID: <20261029200024.32206-1-raaztilak07@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2087453"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:FgC39tVYkE1U+/FgFm0AJ+kIQ9o= sha256:Th2eiKpobX5ms7tjQsh306xMURrxkiybpgyYXafrO+s=
	sha1:mVD7EdiYz57+FXixy1hXp/KuyW0= sha256:HuXJSoYCbJpN2DpQTvdjQFwKa7e+hf1PzpDkv+R2k6A=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 48842125C74; Thu, 29 Oct 2026 23:00:58 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id WAIeQ0lgcdZP;
	Thu, 29 Oct 2026 23:00:55 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-73810-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 5C355125C72; Thu, 29 Oct 2026 23:00:47 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id CCE4C28E04; Thu, 29 Oct 2026 20:00:43 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793304043;
	b=Ss3L+P2QAEl+SHQiLFcG6c5HZc2J9VV8HffGkNGvmputMcm+8PCICPdXfFT7iMMNThe1
	 tc0q5qM3TcYonF5MrPTBxKId3xe5UT8nyrddmf6LZLRBco0mReVUPXleDZCudgPXYgNSo
	 ru5rvCxYxtBBST76Zz5AW6/WynD/zyv9LlgVATk7/A0X2Afuc8uCrOcd23y6PI5IfgXp8
	 URkJAq3ka+PjiScs8RK8Hrw58HY5lQUxRzyHU7vYFoS5ULxuXiqA6UPrm+5rR3aBYgrRE
	 YFi33l70l+UHncPBydE920oIVKiBcjqX4DTQkY6r7aBMXV02SLUD3DSb3FdiA8u+b/A==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793304043;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:Content-Transfer-Encoding;
	bh=qgS724d9ghz7TtZ9GEDapgP+NmTrl4G9+JNl5Hj0qd0=;
	b=NfZua4GgXlzM6b+iOHdrLoBPaQtDICjwmlUbaUHsW2vjL7X6lwyIuZgBtznFivyfRnaT
	 BlvCett2rsS7p4d6HZD0bBvvJXdD5UwRMyzu48DMF9THPQ1HOGKOXV8mEN9BFmjr7rI7N
	 K4WcSo4BlSrrli04b97dig01bwQNfDePiyPZ13p6kGyxBOW4DDN+WqfW0L3aeZeexyULk
	 I66cPPD64VgqceDtGq2IzbJxtQZEA2tXVvOJMCt6eX07acKMjCXt2Rwkf2IGSIsB4SBFM
	 fgltlbEWa+9OzB/yqHYqNAE827NAyDN9HUq6W/nYpvUQAbAeLMW131b4uxnvuFOaYwQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=OOe0T3t8;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F5C3606A322;
	Thu, 29 Oct 2026 20:00:43 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=OOe0T3t8
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.52
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793304042;
	b=Ba1znmgU1vPYHFfwpfRVeTeeMLet+syKHZrMh8N4Bxv1111PhoR5yJxRlRCqcesR8OKa
	 JQyu6hMe3uV23kNv1Ux2bGlhwRbi7lv3GAgrKIXrhjUl+OOA1qUsEKFq9ebzUcI8Jn5rx
	 0UATs1O3xA4/cId5bjvlTodFvhOxXiDwddQAMiUIQJydJP+HeqMVv9dgn2Rm1P8shkg40
	 sq+KlWVxFNhCltcYOnYB05dt6vWl0cgm1XfhQhVck7AdVffTn8NKibqi5/3QZdNWS6wvH
	 OFZqAWSodn1w44tC/v7RKqxKfsYGWjMSNpMtpemRcg9yqMj4Q939z1rgbLSqFgjVvUA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793304042;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding;
	bh=qgS724d9ghz7TtZ9GEDapgP+NmTrl4G9+JNl5Hj0qd0=;
	b=RpgnY8ns47Zj+IAOLbH80JWN8lvUkFFmvKRg8KpSOg3urLOkJ4IS6U6koAxsRq9EETS3
	 2EDtHmr5wNVwpWAF9SOqi1MfUzuam+7JR2QHV8XIhv4aIZUbu3xhlb5Ve5czUlHexiodC
	 FPfGgPNXGsBux6LXz+6S1WuyMoSOkq6ofT/d9tmSiIEIsWnULI6nnOV8/QBAj7+0Ylift
	 rYn9DIA7D1PRESU1PsPcE7iJbWanRWV8bxwkirKeQ5H4XQnu1jOwrrCDgY+7uQKWRgsBn
	 yefXFyZrwmx+TzjDicVQ6jbnG+MRssHp7MzE2u2IbWLPY5sqPC3qNjzrnQ72Y8fk47Q==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=OOe0T3t8;
	arc=none smtp.remote-ip=74.125.82.52
X-Received: from mail-dl1-f52.google.com (mail-dl1-f52.google.com [74.125.82.52])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00402606A31D
	for <git@vger.kernel.org>; Thu, 29 Oct 2026 20:00:41 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 00402606A31D
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dl1-f52.google.com with SMTP id a92af1059eb24-188406bb948so2289966c88.1
        for <git@vger.kernel.org>; Thu, 29 Oct 2026 13:00:41 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1793304041; x=1793908841; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
        bh=qgS724d9ghz7TtZ9GEDapgP+NmTrl4G9+JNl5Hj0qd0=;
        b=OOe0T3t8f8h9pDxUkeQ/6YjI8xhMUnRnkvRYXnhRJJqmOoNuOWxkpOq69yyXepDbl6
         yan3qTwz7p2gkK/aaAAHtVcx1ErB6bXZJEV5SUw6d8a410fJlxuD1Abn3tYjHhpEHLU+
         voNmmxogEme5Sp63XSydWuFexDTjOjoSUgIEFyhaCj5vKAwdAhH2naKmwfypyENlSKgA
         yghfiVWbtmWJ5De9BwB9ouBcIcaaIgmtWBDhjUw3EDq+OthDso1zh2940Mv04CrbA50i
         6IyYDQ1fED17n+6EjuHhdNfZbhT5CPF6tuu/CGYPG8SLnFVCKP911j41PSk0rGiN2HLl
         /JQQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793304041; x=1793908841;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=qgS724d9ghz7TtZ9GEDapgP+NmTrl4G9+JNl5Hj0qd0=;
        b=PB2YIqKMA8wXtRC1AGCBxFDxCwqynkhdK2xIXWK2qM31yoaQ77XmX2KFFg4t91vEIr
         Cfz6OWsU3urvnalaf/PYxWJSCmcrwgNVCv9V+OtraKalEwwfF+lYsCFDhw9dPwTiXA5d
         nE0V0pJFYhoOTS62PF6aBrTt/0bdCilGG98UB8EddC9bgyoWsgWlAOj6yKySZe1gH1Tg
         p8Oo/FGeDZW5hmywwDhc4Nd3tWJCNwWZDBmuErQY5im4QCdUzTkMjvH6F+I6PDEvMp8u
         8g9gPyE2pBCJj11A7S0iZTZeSRMYsbXFVUNto9r+FiXeZ+c7YOhu4WADcjaFAXrnoFn5
         kK4Q==
X-Gm-Message-State: AFq9FYJV+fbs6f58JrNH2Q1pHnHOfJDNBxWHkd9N0UdacjEjpTiyDgR4
	DonkYqADRuUqbAi3Z2hq0qckSP6d5LTOnMDoccSBmiPR++RZJoHcog9Zf4LuoSmX
X-Gm-Gg: AYBFou04t9xqqR3KtoT8YpxDKoeFqhbv81jedOHCq3kcyM0qIeWnj7eih6IjdUhBvd6
	wGtaJAIUv1R9isWNOhodLuZg7PPvKUdMP4asiduGWY94SKepeuG4/rMfdGBusVXEDmUON6wdz1J
	VDyS5LY7ZgyA6WN5JY7025oYehL9xPXId1eC8XjKh75cLb5LZKFSXMY+WE60oMM5GyCl3lu0FC+
	m5/GmYYdek9TqVFQp6bdvmIvsgUtCiMmXgNQuRYVDTSs0jJ80loyEJfVrpaeB3moO2vjyGfT2ZI
	Q7dQlHA3nFkZhbNTF/9Efgju/TV7VuKbprplTVsaCyTCk0HC9Wye19ygAjzzA9+MtFllnd/F6sa
	Em5adk/UkKpgJqlCHeTORQxQSZVejs9q7QFe3xKtUuxN0QZTImTyubPaiavwO1+leIIZwY7vU9/
	Lfn6NjrvxsBY6MnlRh9o++tQLLphjt2BhlGOlB6p9FrQrWuiTCZ2FnprymTpywpOcubVE2XFca6
	1EICOdCNxnXPYt7GGVfWelH05atOgD/uQuJX4znH40CF66LCdb7aZrjllkffYN5ntooW4/b25vR
	yX+wtyYdzkiLnvvuRmt2tkNxmTprRpp2BKjDE/eb/JQLMJ0SAgN+BZEo7TaIq8IBxg1F
X-Received: by 2002:a05:7022:d8d:b0:14d:3c0c:79e8 with SMTP id a92af1059eb24-1ac5b027fdemr70099c88.10.1793304039704;
        Thu, 29 Oct 2026 13:00:39 -0700 (PDT)
X-Received: from localhost.localdomain ([2401:4900:3ea7:b20a:3d0d:24bc:820:2801])
        by smtp.gmail.com with ESMTPSA id a92af1059eb24-1ac1854d925sm1063268c88.7.2026.10.29.13.00.31
        (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
        Thu, 29 Oct 2026 13:00:35 -0700 (PDT)
X-Cc: Tilak Kumar <raaztilak07@gmail.com>
X-Mailer: git-send-email 2.55.0
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list