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

Re: [PATCH 3/3] t-ctype: do one test per class and char

From
Christian Couder <christian.couder@gmail.com>
Date
Feb 27, 2024, 10:04 UTC
Message-ID
<CAP8UFD2t1KRo01eenK_RVndyVx5Vp9F4FepTgnR+mwhTGTvXnw@mail.gmail.com>
In-Reply-To
<ZdzfYPim2SP22eeS@google.com>
On Mon, Feb 26, 2024 at 7:58 PM Josh Steadmon <steadmon@google.com> wrote:
>
> On 2024.02.26 18:26, René Scharfe wrote:
Show 18 quoted lines
> > The output is clean as well, but there's a lot of it.  Perhaps too much.
> > The success messages are boring, though, and if all checks pass then the
> > only useful information is the status code.  A TAP harness like prove
> > summarizes that nicely:
> >
> >    $ prove t/unit-tests/bin/t-ctype
> >    t/unit-tests/bin/t-ctype .. ok
> >    All tests successful.
> >    Files=1, Tests=3598,  0 wallclock secs ( 0.08 usr +  0.00 sys =  0.08 CPU)
> >    Result: PASS
> >
> > Filtering out passing checks e.g. with "| grep -v ^ok" would help when
> > debugging a test failure. I vaguely miss the --immediate switch from the
> > regular test library, however.
>
> Yeah, I agree here. It's a lot of output but it's almost always going to
> be consumed by a test harness rather than a human, and it's easy to
> filter out the noise if someone does need to do some manual debugging.

Yeah, I know about TAP harnesses like prove, but the most straightforward way to run the unit tests is still `make unit-tests` in the t/ directory. Also when you add or change some tests, it's a good idea to run `make unit-tests` to see what the output is, so you still have to see that output quite often when you work on tests and going through 3598 of mostly useless output instead of just 14 isn't nice.

Previous: Josh SteadmonNext: René Scharfe
Message 14 of 30 in “t-ctype: simplify unit test definitions”
  1. 0/3 t-ctype: simplify unit test definitionsRené Scharfe, Feb 25, 2024
  2. 1/3 t-ctype: allow NUL anywhere in the specification stringRené Scharfe, Feb 25, 2024
  3. Eric SunshineFeb 25, 2024
  4. René ScharfeFeb 25, 2024
  5. Eric SunshineFeb 25, 2024
  6. Jeff KingFeb 25, 2024
  7. Eric SunshineFeb 25, 2024
  8. 2/3 t-ctype: avoid duplicating class namesRené Scharfe, Feb 25, 2024
  9. 3/3 t-ctype: do one test per class and charRené Scharfe, Feb 25, 2024
  10. Christian CouderFeb 26, 2024
  11. René ScharfeFeb 26, 2024
  12. Junio C HamanoFeb 26, 2024
  13. Josh SteadmonFeb 26, 2024
  14. Christian CouderFeb 27, 2024
  15. René ScharfeMar 2, 2024
  16. Christian CouderMar 4, 2024
  17. René ScharfeMar 6, 2024
  18. Josh SteadmonMar 4, 2024
  19. Junio C HamanoMar 4, 2024
  20. 0/4 t-ctype: simplify unit test definitionsRené Scharfe, Mar 3, 2024
  21. 2/4 t-ctype: simplify EOF checkRené Scharfe, Mar 3, 2024
  22. 3/4 t-ctype: align output of iRené Scharfe, Mar 3, 2024
  23. 4/4 t-ctype: avoid duplicating class namesRené Scharfe, Mar 3, 2024
  24. Phillip WoodMar 4, 2024
  25. René ScharfeMar 6, 2024
  26. Phillip WoodMar 8, 2024
  27. Phillip WoodMar 9, 2024
  28. René ScharfeMar 10, 2024
  29. 1/4 t-ctype: allow NUL anywhere in the specification stringRené Scharfe, Mar 3, 2024
  30. Christian CouderMar 4, 2024

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.