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

Re: [PATCH 1/3] [RFC] tests: add test_todo() to mark known breakages

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Dec 9, 2022, 09:04 UTC
Message-ID
<f873ad40-f664-bdc4-a6bb-b4e4c113aff4@dunelm.org.uk>
In-Reply-To
<xmqqedt92xjk.fsf@gitster.g>
Hi Junio
On 09/12/2022 01:09, Junio C Hamano wrote:
Show 22 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> writes:
> 
>> I added the restrictions to 'test_todo' to try and stop it being
>> misused but I'm happy to relax them if needed. I'm keen that test_todo
>> is able to distinguish between an expected failure and a failure due
>> to the wrapped command being misused e.g. 'test_todo grep
>> --invalid-option' should report an error.
> 
> Hmm, but it is not useful if the failure is from "you cannot use the
> system command grep with test_todo", as the (implicitly) encouraged
> "fix" the developer who wrote the test would pick would be to use
> "! grep --invalid-option" which would still fail for a wrong reason.
> 
> If a "git" command is expected to run to a completion but is
> currently broken and produces a wrong output, it would be very
> useful to be able to write
> 
> 	git command --args >actual &&
> 	test_todo grep -e "$expected_token" actual
> 
> to say "when 'git command' is fixed, the output should contains
> this, but we know it currently is broken".

You can do that now, the next patch adds support for "test_todo [!] grep" but you currently cannot pass arbitrary commands/helper functions.

Best Wishes
Phillip
Show 6 quoted lines
>> I think you've convinced be to remove the restrictions on what can be
>> wrapped by 'test_todo' when I re-roll.
>>
>> Thanks for your thoughtful comments
> 
> Thanks.
Previous: Junio C HamanoNext: Phillip Wood via GitGitGadget
Message 10 of 20 in “[RFC] tests: add test_todo() for known failures”
  1. 0/3 [RFC] tests: add test_todo() for known failuresPhillip Wood via GitGitGadget, Oct 6, 2022
  2. 1/3 [RFC] tests: add test_todo() to mark known breakagesPhillip Wood via GitGitGadget, Oct 6, 2022
  3. Ævar Arnfjörð BjarmasonOct 6, 2022
  4. Phillip WoodOct 6, 2022
  5. Ævar Arnfjörð BjarmasonOct 6, 2022
  6. Victoria DyeDec 6, 2022
  7. Ævar Arnfjörð BjarmasonDec 7, 2022
  8. Phillip WoodDec 8, 2022
  9. Junio C HamanoDec 9, 2022
  10. Phillip WoodDec 9, 2022
  11. 2/3 [RFC] test_todo: allow [!] grep as the commandPhillip Wood via GitGitGadget, Oct 6, 2022
  12. Ævar Arnfjörð BjarmasonOct 6, 2022
  13. Phillip WoodOct 6, 2022
  14. Ævar Arnfjörð BjarmasonOct 6, 2022
  15. 3/3 [RFC] test_todo: allow [verbose] test as the commandPhillip Wood via GitGitGadget, Oct 6, 2022
  16. Ævar Arnfjörð BjarmasonOct 6, 2022
  17. Junio C HamanoOct 6, 2022
  18. Ævar Arnfjörð BjarmasonOct 6, 2022
  19. Phillip WoodOct 7, 2022
  20. Junio C HamanoOct 7, 2022

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.