git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 2/2] t0450: add allowlist for builtins with missing .adoc

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 2, 2025, 20:57 UTC
Message-ID
<xmqq5xe0incd.fsf@gitster.g>
In-Reply-To
<xmqq8qj3rqgn.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 25 quoted lines
> 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.

Toon, did you have a chance to take a look at Patrick's update? Can we move forward by squashing it into your [2/2]?

Thanks.
Show 57 quoted lines
>
> 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
Previous: Junio C HamanoNext: Toon Claes
Message 10 of 12 in “t0450: fix test for out-of-tree builds”
  1. t0450: fix test for out-of-tree buildsToon Claes, Aug 4, 2025
  2. Patrick SteinhardtAug 4, 2025
  3. Toon ClaesAug 5, 2025
  4. 0/2 Harden test t0450-txt-doc-vs-helpToon Claes, Aug 8, 2025
  5. 1/2 t0450: fix test for out-of-tree buildsToon Claes, Aug 8, 2025
  6. 2/2 t0450: add allowlist for builtins with missing .adocToon Claes, Aug 8, 2025
  7. Junio C HamanoAug 8, 2025
  8. Patrick SteinhardtAug 12, 2025
  9. Junio C HamanoAug 28, 2025
  10. Junio C HamanoSep 2, 2025
  11. Toon ClaesSep 3, 2025
  12. Junio C HamanoSep 3, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.