🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #79

[PATCH] t7004: check a missing key without deleting gpghome

#79
From: "Harald Nordgren via GitGitGadge...
Date: Thu, 08 Oct 2026 09:07
51 lines
9476 bytes
From: Harald Nordgren <haraldnordgren@gmail.com>

The "verify signed tag fails when public key is not present" test
deletes gpghome to lose the key, and this sometimes fails on Alpine
with

    rm: can't remove 'gpghome/S.gpg-agent.extra': No such file or directory

Point GNUPGHOME at an unused directory for the verification, which is
how t7510 checks a signature whose key is unknown.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
---
    t7004: check a missing key without deleting gpghome
    
    Fix flaky test by checking missing key without deleting gpghome.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2443%2FHaraldNordgren%2Fflaky-gpg-http2-tests-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2443/HaraldNordgren/flaky-gpg-http2-tests-v1
Pull-Request: https://github.com/git/git/pull/2443

 t/t7004-tag.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 8c795d7218..a0c2c9a3a1 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -11,6 +11,7 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 . ./test-lib.sh
+GNUPGHOME_NOT_USED=$GNUPGHOME
 . "$TEST_DIRECTORY"/lib-gpg.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
 
@@ -1525,8 +1526,7 @@ test_expect_success GPGSM 'git tag -s fails if gpgsm is misconfigured (bad signa
 # try to verify without gpg:
 
 test_expect_success GPG 'verify signed tag fails when public key is not present' '
-	rm -rf gpghome &&
-	test_must_fail git tag -v signed-tag
+	test_must_fail env GNUPGHOME="$GNUPGHOME_NOT_USED" git tag -v signed-tag
 '
 
 test_expect_success 'git tag -a fails if tag annotation is empty' '

base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd
-- 
gitgitgadget
Technical Details
Message-ID: <pull.2443.git.git.1791450465178.gitgitgadget@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-71448-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-71448-linux-kernel-git=dewy.ru
From: gitgitgadget@gmail.com ("Harald Nordgren via GitGitGadget")
Newsgroups: linux.kernel.git
Subject: [PATCH] t7004: check a missing key without deleting gpghome
Date: Thu, 08 Oct 2026 09:07:45 +0000
Organization: Usenet Network
Message-ID: <pull.2443.git.git.1791450465178.gitgitgadget@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="843056"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:N7/q+5l7a22o8M60Q8Wx8qFs7tQ= sha256:s+DtqJVU+3uXtfhydp4NZEb+pMRd2qpbT4qdq75AHGI=
	sha1:hA/viVApg44kgcZWpdyFb2KAPUs= sha256:wdTpTjqL+zkFaKF7R84PhU7pTcxsZN6//xZodCsojv0=
List-ID: <git.vger.kernel.org>
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 22AF710F367; Thu,  8 Oct 2026 12:17:49 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: 1.609
X-Spam-Level: *
X-Spam-Status: No, score=1.609 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, 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.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_SBL_CSS=3.558,
	SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=no 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 uVQF9K1Y-aEF;
	Thu,  8 Oct 2026 12:17:39 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-71448-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 171EC10F32E; Thu,  8 Oct 2026 12:17:34 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by tor.lore.kernel.org (Postfix) with ESMTP id 279E7321D2; Thu,  8 Oct 2026 09:09:10 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id C02334756B2;
	Thu,  8 Oct 2026 09:07:52 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IlkzDuPh"
X-Received: from mail-dy1-f180.google.com (mail-dy1-f180.google.com [74.125.82.180])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26E0E483BF0
	for <git@vger.kernel.org>; Thu,  8 Oct 2026 09:07:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.180
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791450471; cv=none; b=CrslpisksdAbSpreQ+MWobyhLJ9LidKT44qzydc5hYmhWyXg6YsLMCOUO7p+yqrlXuNC7BET6l805Fl2h3YieYCmPPEmsRQJpuwWsO0z438yENRRgqhrslW/EMHnN42VJOD1Z3vNmEmfKvor84v6hMVQrUyN/NILBmfwDxPsgUI=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791450471; c=relaxed/simple;
	bh=QVs2SzXUXHcdrADwlYsFbylXR6xg4lpoYvRyR0wYmsI=;
	h=Message-Id:From:Date:Subject:Content-Type:MIME-Version:To:Cc; b=c2WK7YmQC4AIybW2+oaLuoeSM1IiGmB6WLGFHutOxNqJ2u2YPbZd7wmovyzR0shGR0e7UYWvC3WZOv0x4h9QMbDH7aY09/rQ5oNZENl9Z7JbiG0OhJLtmp8iTaTpHKV6mTwSFToEzYi73Kx47Uu8QygIunwdKOWY491SIav+LN4=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IlkzDuPh; arc=none smtp.client-ip=74.125.82.180
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-dy1-f180.google.com with SMTP id 5a478bee46e88-3516c82e96cso2438556eec.0
        for <git@vger.kernel.org>; Thu, 08 Oct 2026 02:07:47 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1791450467; x=1792055267; darn=vger.kernel.org;
        h=cc:to:mime-version:content-transfer-encoding:content-type:fcc
         :subject:date:from:message-id:from:to:cc:subject:date:message-id
         :reply-to:content-type;
        bh=sOeOo+K2ftq93tn5GMW6Cdsf0CgXihd8g/CJ71NUKMw=;
        b=IlkzDuPhDxxOAoeoVVmkSmnO0acwa2TuodMbXas1hDT2OmUbgA3fC7+N47o5rsQRUQ
         hl7gF5q3LbGuf4UX65wf82PS2oznKKh/iBbj8FShU+JsLHT+d0770o/H5joexxqTyux1
         dwGLrd8IW3ijFwvw3QlP/bbM6lxcgCpu2GXBhCUcFvFxAHa22kvkY5aIHCyxJBWJFoKE
         5wKi8TK3Bc5bb+bAVxwsqlV7raMyr5pmCd4TO7zPc9JiasL38COBQyvjhZrp+AM8Ojok
         o+6EJekTIRl2A13Z+lm8m/ZxtdPg0MnSrXu0M5HZBkvqO0sx9M5DzV26oC4aPk89g5Qe
         Inaw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1791450467; x=1792055267;
        h=cc:to:mime-version:content-transfer-encoding:content-type:fcc
         :subject:date:from:message-id:x-gm-gg:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to:content-type;
        bh=sOeOo+K2ftq93tn5GMW6Cdsf0CgXihd8g/CJ71NUKMw=;
        b=1XWgpc0bwsMMIR0AV2/aoqMz3pkMAejZdwouo9DZTePQTuSWtUU2OYgxKNicmQ3hkb
         KfaRPlL7hRpIn79oRtNhwnZE8tUei2ezL3tzfh9m3QaQOyrhYOCR8U46dWIzFi9aULGb
         vv8cjPkGJGuQCCQm+Zbj+7MB4hNsmgILwuuhYcJkQV93hVe61Azbbalu7BIxvBcomRVa
         2snfl006J96T/5rcU9jrbC/6D3JwbDdQjzxzMMmA7OqhlPGL49tjdLO0hwy+3YLRtKyw
         9++Yd8FrD3bHqVsEVeGCjNCg7zQ5yILiaJs+sMBUq47/RsPJfkhnRSDs6mTCFuI27VGV
         fAuA==
X-Gm-Message-State: AFq9FYLEZZw8XM1ze4RKxYuDSemmDvHMtND0++9NRHDaEFZsnPXPg+qq
	aU1wKoCvM35QDRFVou61eAyTX+D1hb8yPlvwOEYzU7MAjxZrydgcntlrevNeXg==
X-Gm-Gg: AYBFou03zodwvlCO62IZuwZXv6ZVTLugMSTgXwI4F79TLdoHTn/Q97UpZlbeE3HDaW8
	j+MPHAjUuX4x7foTgdxA5/SpCfpUr70LvLN4pWmYSmJnKiwAfNzM6kbpGc4SaHNvIa3kvcDcr4y
	qa/I4dWmYXM3m0pGu2WUIkvLrs6AxmSssNOEdZWlzqwkL9h+iPencTlr/km4s17D/NuMdMibfI0
	LPosHQv3GmzjxqNtZl0g6M1aiN6hiIpNuC8hAB8nMU3SNk/O9abtzYoPPtbHl6lBH3OfjpH+lTA
	KtIVVYEN9TA9l19WwevOB51o0Sb2vCBc7Uc3B3fLEJTo/ipz+Wx7CQqFOcfkV/iv5KQ7y2ZJCIa
	KoTkgcJd3OFHW49qwNOIuvr2L1xup1nQ8gv6HoXoFr92fRjQfK0NTL/8Zhs0QlqD6sav7s1eY37
	NN0qjuZk25b6QP8L2vb6NB+AMvAJJRPfcxfGHwALne6aEeSuF5EXdDRiUcEv/ews4BDy4peg8pW
	P4=
X-Received: by 2002:a05:7300:acad:b0:33e:a173:4aab with SMTP id 5a478bee46e88-3515dda8652mr6224094eec.14.1791450466767;
        Thu, 08 Oct 2026 02:07:46 -0700 (PDT)
X-Received: from [127.0.0.1] ([52.153.130.112])
        by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3515aeb5b46sm14630351eec.7.2026.10.08.02.07.45
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 08 Oct 2026 02:07:46 -0700 (PDT)
X-Fcc: Sent
X-Precedence: bulk
X-Mailing-List: git@vger.kernel.org
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-Cc: Harald Nordgren <haraldnordgren@gmail.com>,
    Harald Nordgren <haraldnordgren@gmail.com>