Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: Todd Zullinger <tmz@pobox.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Fabian Stelzer <fs@gigacodes.de>
Subject: [PATCH] t/lib-gpg: require GPGSSH for GPGSSH_VERIFYTIME prereq
Date: Tue,  6 Jun 2023 17:47:07 -0400	[thread overview]
Message-ID: <20230606214707.55739-1-tmz@pobox.com> (raw)
In-Reply-To: <xmqqa5xjeqmm.fsf@gitster.g>

The GPGSSH_VERIFYTIME prequeq makes use of "${GNUPGHOME}" but does not
create it.  Require GPGSSH which creates the "${GNUPGHOME}" directory.

Additionally, it makes sense to require GPGSSH in GPGSSH_VERIFYTIME
because the latter builds on the former.  If we can't use GPGSSH,
there's little point in checking whether GPGSSH_VERIFYTIME is usable.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Todd Zullinger <tmz@pobox.com>
---
Hi,

Junio C Hamano wrote:
>> Good idea. Perhaps:
>>
>>      test_lazy_prereq GPGSSH_VERIFYTIME '
>>              test_have_prereq GPGSSH &&
>>
>> is best there?  The GPGSSH prereq creates ${GNUPGHOME}.  It
>> may not be common, but there may be folks who want to run
>> the SSH tests and don't care about GPG.
> 
> OK.  I'll certainly forget, so hold on to the patch and resend after
> the dust settles from the release.

Alright.  Here's that patch.  Hopefully it's not too dusty
where you are.  If so, I can re-send later. :)

Cheers,

Todd

 t/lib-gpg.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index 114785586a..db63aeb6ed 100644
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -135,6 +135,7 @@ test_lazy_prereq GPGSSH '
 '
 
 test_lazy_prereq GPGSSH_VERIFYTIME '
+	test_have_prereq GPGSSH &&
 	# Check if ssh-keygen has a verify-time option by passing an invalid date to it
 	ssh-keygen -Overify-time=INVALID -Y check-novalidate -s doesnotmatter 2>&1 | grep -q -F "Invalid \"verify-time\"" &&
 
-- 
2.41.0

      reply	other threads:[~2023-06-06 21:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25  3:10 [PATCH] t/lib-gpg: fix ssh-keygen -Y check-novalidate with openssh-9.0 Todd Zullinger
2023-05-26  4:52 ` Junio C Hamano
2023-05-26  5:28   ` Todd Zullinger
2023-06-01  4:46     ` Junio C Hamano
2023-06-06 21:47       ` Todd Zullinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230606214707.55739-1-tmz@pobox.com \
    --to=tmz@pobox.com \
    --cc=fs@gigacodes.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).