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

Re: [PATCH v4 1/2] test-lib: run EXPENSIVE tests one at a time

From
Christian Couder <christian.couder@gmail.com>
Date
Dec 1, 2026, 11:10 UTC
Message-ID
<CAP8UFD3XPr_rfv6dui4ExLnhRkmyL71bqT1POwVHiGqigVO60Q@mail.gmail.com>
In-Reply-To
<8427f816-2d04-460e-8909-f0740724f2a5@gmail.com>

On Tue, Dec 1, 2026 at 11:14 AM Kaartic Sivaraam <kaartic.sivaraam@gmail.com> wrote:

Show 15 quoted lines
> >> +                       continue
> >> +               fi
> >> +               if test -z "$waited"
> >> +               then
> >> +                       say >&3 "waiting for another EXPENSIVE test to finish"
> >
> > This and the message in expensive_lock_unavailable_() use `say >&3`
> > which prints to /dev/null when `-v` or `--verbose-log` is not passed.
> >
> > This is not an issue for CI runs as `--verbose-log` is used then. But
> > someone running tests locally without `-v` might wonder why their
> > local run is stuck.
>
> Indeed. But I kind of assumed anyone wanting more diagnostics would run
> with '-v' anyways.

People might not know they need diagnostics as a script waiting on the lock looks just like a slow EXPENSIVE test. And, when using `-v`, the output is around 20 times (60 times if `-x` is also used) more verbose than without it, so there are good reasons not to use `-v`.

Also under `prove`, `-v` is not even allowed ("verbose mode forbidden under TAP harness; try --verbose-log"), and not sure a lot of people use `--verbose-log` with it.

Show 22 quoted lines
> > With Meson, or when running scripts or `prove` directly, nothing
> > cleans test-results/. So a lock left behind by SIGKILL (including the
> > OOM killer) can still be there days later. The same PID could then be
> > reused by a long-running process of the same user. This would result
> > in the script silently waiting forever.
> >
> > In such a case, printing something even if `-v` or `--verbose-log` is
> > not used, would likely make it much easier to understand what's going
> > on.
> >
> > So I would suggest sending this message, as well as the "running
> > anyway" and "removing stale" messages, to stderr instead. There are
> > only a few dozen EXPENSIVE tests, so this should not add much output.
> > The subtests in 2/2 that go through the stale lock removal would then
> > need to expect that message on stderr though.
> >
> > The message would also help even more if it included the holder's PID,
> > for example like "waiting for EXPENSIVE lock held by PID 1234".
> >
>
> Okay. I guess sending to stderr doesn't do us much harm either. I'll
> prefix it with a '#' to ensure it doesn't interfere with TAP.

Great, but don't TAP parsers only read stdout? If sending to stderr, a '#' might not be needed.

Anyway thanks for working on this.
Previous: Kaartic SivaraamNext: Kaartic Sivaraam
Message 20 of 32 in “test-lib: run EXPENSIVE tests one at a time”
  1. test-lib: run EXPENSIVE tests one at a timeKaartic Sivaraam, Nov 19, 2026
  2. Patrick SteinhardtNov 19, 2026
  3. Kaartic SivaraamNov 19, 2026
  4. test-lib: run EXPENSIVE tests one at a timeKaartic Sivaraam, Nov 19, 2026
  5. Kaartic SivaraamNov 19, 2026
  6. Junio C HamanoNov 20, 2026
  7. Kaartic SivaraamNov 24, 2026
  8. Junio C HamanoNov 25, 2026
  9. Kaartic SivaraamNov 27, 2026
  10. Junio C HamanoNov 27, 2026
  11. Harald NordgrenNov 25, 2026
  12. test-lib: run EXPENSIVE tests one at a timeKaartic Sivaraam, Nov 27, 2026
  13. Junio C HamanoNov 27, 2026
  14. Kaartic SivaraamNov 28, 2026
  15. 0/2 test-lib: serialize EXPENSIVE tests to avoid OOM in CIKaartic Sivaraam, Nov 28, 2026
  16. 1/2 test-lib: run EXPENSIVE tests one at a timeKaartic Sivaraam, Nov 28, 2026
  17. Junio C HamanoNov 29, 2026
  18. Christian CouderNov 30, 2026
  19. Kaartic SivaraamDec 1, 2026
  20. Christian CouderDec 1, 2026
  21. Kaartic SivaraamDec 1, 2026
  22. Patrick SteinhardtDec 1, 2026
  23. Kaartic SivaraamDec 1, 2026
  24. Patrick SteinhardtDec 1, 2026
  25. Kaartic SivaraamDec 1, 2026
  26. Patrick SteinhardtDec 1, 2026
  27. 2/2 t0000: test taking over and releasing the EXPENSIVE lockKaartic Sivaraam, Nov 28, 2026
  28. Patrick SteinhardtDec 1, 2026
  29. Kaartic SivaraamDec 1, 2026
  30. test-lib: run EXPENSIVE tests one at a timeKaartic Sivaraam, Dec 1, 2026
  31. Patrick SteinhardtDec 3, 2026
  32. Kaartic SivaraamDec 3, 2026

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.