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

Re: [PATCH 00/12] t: detect errors outside of test cases

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 13, 2026, 21:33 UTC
Message-ID
<xmqqy0iqfsuu.fsf@gitster.g>
In-Reply-To
<20260413-b4-pks-tests-with-set-e-v1-0-5b83763a0e84@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 10 quoted lines
> this is a follow-up to the recent discussion we had around `set -e` to
> make our tests more robust and basically supersedes Junio's [1].
>
> I've tested the patches with both Bash and Dash, and all tests are
> passing on my machine with both of them. CI seems to be happy, as
> well. But I would expect that this change probably has some fallout,
> even though I hope that it's generally going to be small and contained.
>
> This series is based on 8c9303b1ff (Merge branch
> 'jc/no-writev-does-not-work', 2026-04-10).

This unfortunately breaks svn related tests big time for me, as I deliberately do not install Perl modules that are needed for git-svn.

    $ cd t && sh t9152-svn-empty-dirs-after-gc.sh -i -v
    Initialized empty Git repository in /home/gitster/git/t/trash directory.t9152-svn-empty-dirs-after-gc/.git/
    Can't locate SVN/Core.pm in @INC (you may need to install the SVN::Core module) (@INC entries checked: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.40.1 /usr/local/share/perl/5.40.1 /usr/lib/x86_64-linux-gnu/perl5/5.40 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.40 /usr/share/perl/5.40 /usr/local/lib/site_perl) at -e line 2.
    BEGIN failed--compilation aborted at -e line 2.
    FATAL: Unexpected exit with code 2
    $ cd t && ls -d trash\ directory.t*
    trash directory.t9100-git-svn-basic
    trash directory.t9101-git-svn-props
    trash directory.t9102-git-svn-deep-rmdir
    trash directory.t9103-git-svn-tracked-directory-removed
    trash directory.t9104-git-svn-follow-parent
    trash directory.t9105-git-svn-commit-diff
    trash directory.t9106-git-svn-commit-diff-clobber
    trash directory.t9107-git-svn-migrate
    trash directory.t9108-git-svn-glob
    trash directory.t9109-git-svn-multi-glob
    trash directory.t9110-git-svn-use-svm-props
    trash directory.t9111-git-svn-use-svnsync-props
    trash directory.t9112-git-svn-md5less-file
    trash directory.t9113-git-svn-dcommit-new-file
    trash directory.t9114-git-svn-dcommit-merge
    trash directory.t9115-git-svn-dcommit-funky-renames
    trash directory.t9116-git-svn-log
    trash directory.t9117-git-svn-init-clone
    trash directory.t9118-git-svn-funky-branch-names
    trash directory.t9119-git-svn-info
    trash directory.t9120-git-svn-clone-with-percent-escapes
    trash directory.t9121-git-svn-fetch-renamed-dir
    trash directory.t9122-git-svn-author
    trash directory.t9123-git-svn-rebuild-with-rewriteroot
    trash directory.t9124-git-svn-dcommit-auto-props
    trash directory.t9125-git-svn-multi-glob-branch-names
    trash directory.t9126-git-svn-follow-deleted-readded-directory
    trash directory.t9127-git-svn-partial-rebuild
    trash directory.t9128-git-svn-cmd-branch
    trash directory.t9129-git-svn-i18n-commitencoding
    trash directory.t9130-git-svn-authors-file
    trash directory.t9131-git-svn-empty-symlink
    trash directory.t9132-git-svn-broken-symlink
    trash directory.t9133-git-svn-nested-git-repo
    trash directory.t9134-git-svn-ignore-paths
    trash directory.t9135-git-svn-moved-branch-empty-file
    trash directory.t9136-git-svn-recreated-branch-empty-file
    trash directory.t9137-git-svn-dcommit-clobber-series
    trash directory.t9138-git-svn-authors-prog
    trash directory.t9139-git-svn-non-utf8-commitencoding
    trash directory.t9140-git-svn-reset
    trash directory.t9141-git-svn-multiple-branches
    trash directory.t9142-git-svn-shallow-clone
    trash directory.t9143-git-svn-gc
    trash directory.t9144-git-svn-old-rev_map
    trash directory.t9145-git-svn-master-branch
    trash directory.t9146-git-svn-empty-dirs
    trash directory.t9147-git-svn-include-paths
    trash directory.t9148-git-svn-propset
    trash directory.t9150-svk-mergetickets
    trash directory.t9151-svn-mergeinfo
    trash directory.t9152-svn-empty-dirs-after-gc
    trash directory.t9153-git-svn-rewrite-uuid
    trash directory.t9154-git-svn-fancy-glob
    trash directory.t9155-git-svn-fetch-deleted-tag
    trash directory.t9156-git-svn-fetch-deleted-tag-2
    trash directory.t9157-git-svn-fetch-merge
    trash directory.t9158-git-svn-mergeinfo
    trash directory.t9159-git-svn-no-parent-mergeinfo
    trash directory.t9160-git-svn-preserve-empty-dirs
    trash directory.t9161-git-svn-mergeinfo-push
    trash directory.t9162-git-svn-dcommit-interactive
    trash directory.t9163-git-svn-reset-clears-caches
    trash directory.t9164-git-svn-dcommit-concurrent
    trash directory.t9165-git-svn-fetch-merge-branch-of-branch
    trash directory.t9166-git-svn-fetch-merge-branch-of-branch2
    trash directory.t9167-git-svn-cmd-branch-subproject
    trash directory.t9168-git-svn-partially-globbed-names
    trash directory.t9169-git-svn-dcommit-crlf
Previous: Junio C HamanoNext: Junio C Hamano
Message 48 of 95 in “t: detect errors outside of test cases”
  1. 00/12 t: detect errors outside of test casesPatrick Steinhardt, Apr 13, 2026
  2. 01/12 t: prepare `test_match_signal ()` calls for `set -e`Patrick Steinhardt, Apr 13, 2026
  3. Junio C HamanoApr 13, 2026
  4. Patrick SteinhardtApr 14, 2026
  5. Junio C HamanoApr 14, 2026
  6. 02/12 t: prepare `test_must_fail ()` for `set -e`Patrick Steinhardt, Apr 13, 2026
  7. Junio C HamanoApr 13, 2026
  8. Patrick SteinhardtApr 14, 2026
  9. Jeff KingApr 14, 2026
  10. Junio C HamanoApr 14, 2026
  11. Patrick SteinhardtApr 15, 2026
  12. Jeff KingApr 16, 2026
  13. 03/12 t: prepare `stop_git_daemon ()` for `set -e`Patrick Steinhardt, Apr 13, 2026
  14. Junio C HamanoApr 13, 2026
  15. 04/12 t: prepare `git config --unset` calls for `set -e`Patrick Steinhardt, Apr 13, 2026
  16. Junio C HamanoApr 13, 2026
  17. 05/12 t: prepare conditional test execution for `set -e`Patrick Steinhardt, Apr 13, 2026
  18. Junio C HamanoApr 13, 2026
  19. 06/12 t: prepare execution of potentially failing commands for `set -e`Patrick Steinhardt, Apr 13, 2026
  20. Junio C HamanoApr 13, 2026
  21. Patrick SteinhardtApr 14, 2026
  22. Junio C HamanoApr 14, 2026
  23. Junio C HamanoApr 13, 2026
  24. Junio C HamanoApr 14, 2026
  25. Patrick SteinhardtApr 14, 2026
  26. Patrick SteinhardtApr 14, 2026
  27. Junio C HamanoApr 14, 2026
  28. Jeff KingApr 14, 2026
  29. Jeff KingApr 14, 2026
  30. Jeff KingApr 14, 2026
  31. Patrick SteinhardtApr 15, 2026
  32. Jeff KingApr 16, 2026
  33. Patrick SteinhardtApr 16, 2026
  34. Junio C HamanoApr 16, 2026
  35. Jeff KingApr 18, 2026
  36. Junio C HamanoApr 15, 2026
  37. 07/12 t: prepare `test_when_finished ()`/`test_atexit()` for `set -e`Patrick Steinhardt, Apr 13, 2026
  38. Junio C HamanoApr 13, 2026
  39. Patrick SteinhardtApr 14, 2026
  40. 08/12 t0008: silence error in subshell when using `grep -v`Patrick Steinhardt, Apr 13, 2026
  41. Junio C HamanoApr 13, 2026
  42. Patrick SteinhardtApr 14, 2026
  43. 09/12 t1301: don't fail in case setfacl(1) doesn't exist or failsPatrick Steinhardt, Apr 13, 2026
  44. 10/12 t6002: fix use of `expr` with `set -e`Patrick Steinhardt, Apr 13, 2026
  45. 11/12 t9902: fix use of `read` with `set -e`Patrick Steinhardt, Apr 13, 2026
  46. 12/12 t: detect errors outside of test casesPatrick Steinhardt, Apr 13, 2026
  47. Junio C HamanoApr 13, 2026
  48. Junio C HamanoApr 13, 2026
  49. Junio C HamanoApr 13, 2026
  50. 00/12 t: detect errors outside of test casesPatrick Steinhardt, Apr 16, 2026
  51. 01/12 t: prepare `test_match_signal ()` calls for `set -e`Patrick Steinhardt, Apr 16, 2026
  52. 02/12 t: prepare `test_must_fail ()` for `set -e`Patrick Steinhardt, Apr 16, 2026
  53. 03/12 t: prepare `stop_git_daemon ()` for `set -e`Patrick Steinhardt, Apr 16, 2026
  54. 04/12 t: prepare `git config --unset` calls for `set -e`Patrick Steinhardt, Apr 16, 2026
  55. 05/12 t: prepare conditional test execution for `set -e`Patrick Steinhardt, Apr 16, 2026
  56. 06/12 t: prepare execution of potentially failing commands for `set -e`Patrick Steinhardt, Apr 16, 2026
  57. 07/12 t: prepare `test_when_finished ()`/`test_atexit()` for `set -e`Patrick Steinhardt, Apr 16, 2026
  58. 08/12 t0008: silence error in subshell when using `grep -v`Patrick Steinhardt, Apr 16, 2026
  59. 09/12 t1301: don't fail in case setfacl(1) doesn't exist or failsPatrick Steinhardt, Apr 16, 2026
  60. 10/12 t6002: fix use of `expr` with `set -e`Patrick Steinhardt, Apr 16, 2026
  61. 11/12 t9902: fix use of `read` with `set -e`Patrick Steinhardt, Apr 16, 2026
  62. SZEDER GáborApr 16, 2026
  63. Junio C HamanoApr 16, 2026
  64. Patrick SteinhardtApr 17, 2026
  65. 12/12 t: detect errors outside of test casesPatrick Steinhardt, Apr 16, 2026
  66. Junio C HamanoApr 16, 2026
  67. 00/12 t: detect errors outside of test casesPatrick Steinhardt, Apr 20, 2026
  68. 01/12 t: prepare `test_match_signal ()` calls for `set -e`Patrick Steinhardt, Apr 20, 2026
  69. 02/12 t: prepare `test_must_fail ()` for `set -e`Patrick Steinhardt, Apr 20, 2026
  70. 03/12 t: prepare `stop_git_daemon ()` for `set -e`Patrick Steinhardt, Apr 20, 2026
  71. 04/12 t: prepare `git config --unset` calls for `set -e`Patrick Steinhardt, Apr 20, 2026
  72. 05/12 t: prepare conditional test execution for `set -e`Patrick Steinhardt, Apr 20, 2026
  73. 06/12 t: prepare execution of potentially failing commands for `set -e`Patrick Steinhardt, Apr 20, 2026
  74. 07/12 t: prepare `test_when_finished ()`/`test_atexit()` for `set -e`Patrick Steinhardt, Apr 20, 2026
  75. 08/12 t0008: silence error in subshell when using `grep -v`Patrick Steinhardt, Apr 20, 2026
  76. 09/12 t1301: don't fail in case setfacl(1) doesn't exist or failsPatrick Steinhardt, Apr 20, 2026
  77. 10/12 t6002: fix use of `expr` with `set -e`Patrick Steinhardt, Apr 20, 2026
  78. 11/12 t9902: fix use of `read` with `set -e`Patrick Steinhardt, Apr 20, 2026
  79. 12/12 t: detect errors outside of test casesPatrick Steinhardt, Apr 20, 2026
  80. Junio C HamanoApr 20, 2026
  81. Jeff KingApr 21, 2026
  82. Patrick SteinhardtApr 21, 2026
  83. 00/12 t: detect errors outside of test casesPatrick Steinhardt, Apr 21, 2026
  84. 01/12 t: prepare `test_match_signal ()` calls for `set -e`Patrick Steinhardt, Apr 21, 2026
  85. 02/12 t: prepare `test_must_fail ()` for `set -e`Patrick Steinhardt, Apr 21, 2026
  86. 03/12 t: prepare `stop_git_daemon ()` for `set -e`Patrick Steinhardt, Apr 21, 2026
  87. 04/12 t: prepare `git config --unset` calls for `set -e`Patrick Steinhardt, Apr 21, 2026
  88. 05/12 t: prepare conditional test execution for `set -e`Patrick Steinhardt, Apr 21, 2026
  89. 06/12 t: prepare execution of potentially failing commands for `set -e`Patrick Steinhardt, Apr 21, 2026
  90. 07/12 t: prepare `test_when_finished ()`/`test_atexit()` for `set -e`Patrick Steinhardt, Apr 21, 2026
  91. 08/12 t0008: silence error in subshell when using `grep -v`Patrick Steinhardt, Apr 21, 2026
  92. 09/12 t1301: don't fail in case setfacl(1) doesn't exist or failsPatrick Steinhardt, Apr 21, 2026
  93. 10/12 t6002: fix use of `expr` with `set -e`Patrick Steinhardt, Apr 21, 2026
  94. 11/12 t9902: fix use of `read` with `set -e`Patrick Steinhardt, Apr 21, 2026
  95. 12/12 t: detect errors outside of test casesPatrick Steinhardt, Apr 21, 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.