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

[PATCH 1/4] t7527: fix broken TAP output

From
Patrick Steinhardt <ps@pks.im>
Date
Jun 2, 2026, 08:54 UTC
Message-ID
<20260602-pks-t7527-fix-tap-output-v1-1-db3da2a1b137@pks.im>
In-Reply-To
<20260602-pks-t7527-fix-tap-output-v1-0-db3da2a1b137@pks.im>

Before running the tests in t7527 we first verify whether the fsmonitor even works, which seems to depend on the actual filesystem that is in use. The verification executes outside of any prerequisite or test body, so its stdout/stderr is not being redirected.

The consequence of this is that any command that prints to stdout/stderr may break the TAP specification by printing invalid lines. And in fact we already do that, as git-init(1) prints the path to the created Git repository by default.

Fix this issue by moving the logic into a lazy prerequisite.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 t/t7527-builtin-fsmonitor.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/t/t7527-builtin-fsmonitor.sh b/t/t7527-builtin-fsmonitor.sh
index b63c162f9b..d881e27466 100755
--- a/t/t7527-builtin-fsmonitor.sh
+++ b/t/t7527-builtin-fsmonitor.sh
@@ -25,7 +25,8 @@ maybe_timeout () {
 		"$@"
 	fi
 }
-verify_fsmonitor_works () {
+
+test_lazy_prereq FSMONITOR_WORKS '
 	git init test_fsmonitor_smoke || return 1
 
 	GIT_TRACE_FSMONITOR="$PWD/smoke.trace" &&
@@ -50,9 +51,9 @@ verify_fsmonitor_works () {
 	ret=$?
 	rm -rf test_fsmonitor_smoke smoke.trace
 	return $ret
-}
+'
 
-if ! verify_fsmonitor_works
+if ! test_have_prereq FSMONITOR_WORKS
 then
 	skip_all="filesystem does not deliver fsmonitor events (container/overlayfs?)"
 	test_done
-- 
2.54.0.1064.gd145956f57.dirty
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 2 of 18 in “t: fix broken TAP output”
  1. 0/4 t: fix broken TAP outputPatrick Steinhardt, Jun 2, 2026
  2. 1/4 t7527: fix broken TAP outputPatrick Steinhardt, Jun 2, 2026
  3. 2/4 t/test-lib: silence EBUSY errors on Windows during test cleanupPatrick Steinhardt, Jun 2, 2026
  4. 3/4 t/lib-git-p4: silence output when killing p4d and its watchdogPatrick Steinhardt, Jun 2, 2026
  5. Junio C HamanoJun 2, 2026
  6. Patrick SteinhardtJun 2, 2026
  7. Junio C HamanoJun 2, 2026
  8. 4/4 t: let prove fail when parsing invalid TAP outputPatrick Steinhardt, Jun 2, 2026
  9. 0/8 t: fix broken TAP outputPatrick Steinhardt, Jun 4, 2026
  10. 1/8 gitlab-ci: rearrange Linux jobs to match GitHub's orderPatrick Steinhardt, Jun 4, 2026
  11. 2/8 gitlab-ci: add missing Linux jobsPatrick Steinhardt, Jun 4, 2026
  12. 3/8 ci: unify Linux images across GitLab and GitHubPatrick Steinhardt, Jun 4, 2026
  13. 4/8 t7527: fix broken TAP outputPatrick Steinhardt, Jun 4, 2026
  14. 5/8 t7810: turn MB_REGEX check into a lazy prereqPatrick Steinhardt, Jun 4, 2026
  15. Jeff KingJun 9, 2026
  16. 6/8 t/test-lib: silence EBUSY errors on Windows during test cleanupPatrick Steinhardt, Jun 4, 2026
  17. 7/8 t/lib-git-p4: silence output when killing p4d and its watchdogPatrick Steinhardt, Jun 4, 2026
  18. 8/8 t: let prove fail when parsing invalid TAP outputPatrick Steinhardt, Jun 4, 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.