From: Junio C Hamano <gitster@pobox.com>
To: Toon Claes <toon@iotcl.com>
Cc: Patrick Steinhardt <ps@pks.im>, git@vger.kernel.org
Subject: Re: [PATCH v2 2/2] t0450: add allowlist for builtins with missing .adoc
Date: Thu, 28 Aug 2025 16:12:08 -0700 [thread overview]
Message-ID: <xmqq8qj3rqgn.fsf@gitster.g> (raw)
In-Reply-To: <aJs5D2jPh8Uom96p@pks.im> (Patrick Steinhardt's message of "Tue, 12 Aug 2025 14:52:31 +0200")
Patrick Steinhardt <ps@pks.im> writes:
>> > To ensure no new builtins are added without documentation, add an
>> > allowlist: t0450/adoc-missing...
>> > ...
>> > t/t0450-txt-doc-vs-help.sh | 8 +++++++-
>> > 1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> Forgot to add something?
>
> Indeed. Toon is currently out of office, so I had a look at what it
> takes. The below patch is what I ended up with -- note that I also had
> to reverse the `grep` condition to set the prereq in the else branch.
>
> Let me know whether you're fine with just squashing these changes in or
> whether I shall send another version.
I've marked this topic in the What's cooking report to be expecting
a reroll after 2.51 final gets tagged, which has now done. If the
fixup! sitting at the tip of the topic is good to Toon's eyes, then
I can squash it in and mark the topic for 'next' without waiting for
a reroll. If not, please do send in a hopefully small and final
update.
Thanks.
From: Patrick Steinhardt <ps@pks.im>
Date: Tue, 12 Aug 2025 14:52:31 +0200
Subject: [PATCH] fixup! t0450: add allowlist for builtins with missing .adoc
---
t/t0450-txt-doc-vs-help.sh | 17 ++++++++++-------
t/t0450/adoc-missing | 9 +++++++++
2 files changed, 19 insertions(+), 7 deletions(-)
create mode 100644 t/t0450/adoc-missing
diff --git a/t/t0450-txt-doc-vs-help.sh b/t/t0450-txt-doc-vs-help.sh
index 980130be78..e12e18f97f 100755
--- a/t/t0450-txt-doc-vs-help.sh
+++ b/t/t0450-txt-doc-vs-help.sh
@@ -112,16 +112,19 @@ do
adoc="$(builtin_to_adoc "$builtin")" &&
preq="$(echo BUILTIN_ADOC_$builtin | tr '[:lower:]-' '[:upper:]_')" &&
- # if and only if *.adoc is missing, builtin shall be listed in t0450/adoc-missing
- result=success
+ # If and only if *.adoc is missing, builtin shall be listed in t0450/adoc-missing.
if grep -q "^$builtin$" "$TEST_DIRECTORY"/t0450/adoc-missing
then
+ test_expect_success "$builtin appropriately marked as not having .adoc" '
+ ! test -f "$adoc"
+ '
+ else
test_set_prereq "$preq"
- result=failure
- fi &&
- test_expect_$result "$builtin appropriately marked as having missing .adoc" '
- test -f "$adoc"
- '
+
+ test_expect_success "$builtin appropriately marked as having .adoc" '
+ test -f "$adoc"
+ '
+ fi
# *.adoc output assertions
test_expect_success "$preq" "$builtin *.adoc SYNOPSIS has dashed labels" '
diff --git a/t/t0450/adoc-missing b/t/t0450/adoc-missing
new file mode 100644
index 0000000000..1ec9f8dcf3
--- /dev/null
+++ b/t/t0450/adoc-missing
@@ -0,0 +1,9 @@
+checkout--worker
+merge-ours
+merge-recursive
+merge-recursive-ours
+merge-recursive-theirs
+merge-subtree
+pickaxe
+submodule--helper
+upload-archive--writer
--
2.51.0-262-gbae8ff527a
next prev parent reply other threads:[~2025-08-28 23:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-04 7:30 [PATCH] t0450: fix test for out-of-tree builds Toon Claes
2025-08-04 7:56 ` Patrick Steinhardt
2025-08-05 12:11 ` Toon Claes
2025-08-08 9:59 ` [PATCH v2 0/2] Harden test t0450-txt-doc-vs-help Toon Claes
2025-08-08 9:59 ` [PATCH v2 1/2] t0450: fix test for out-of-tree builds Toon Claes
2025-08-08 9:59 ` [PATCH v2 2/2] t0450: add allowlist for builtins with missing .adoc Toon Claes
2025-08-08 22:07 ` Junio C Hamano
2025-08-12 12:52 ` Patrick Steinhardt
2025-08-28 23:12 ` Junio C Hamano [this message]
2025-09-02 20:57 ` Junio C Hamano
2025-09-03 11:26 ` Toon Claes
2025-09-03 18:46 ` Junio C Hamano
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=xmqq8qj3rqgn.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
--cc=toon@iotcl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.