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

Re: [PATCH 0/6] test: make the test suite work with zsh

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Mar 30, 2023, 07:47 UTC
Message-ID
<CAMP44s1Amx4raO2rzTHxCgfEXywZwPCJwJ8edzJO_+_pY8PAkg@mail.gmail.com>
In-Reply-To
<xmqqjzyz3p5n.fsf@gitster.g>
On Wed, Mar 29, 2023 at 9:15 PM Junio C Hamano <gitster@pobox.com> wrote:
> If the native mode didn't impose too much burden on our developers'
> to maintain, it would have been nicer, but judging from the contents
> of these patches, I am afraid that it falls on the other side of the
> line.
There is zero burden to maintain.

What burden did this fix specific for ksh93 cause to "our developers" 0e418e568f (t0005: work around strange $? in ksh when program terminated by a signal, 2010-07-09)?

--- a/t/t0005-signals.sh
+++ b/t/t0005-signals.sh
@@ -13,6 +13,7 @@ test_expect_success 'sigchain works' '
        test-sigchain >actual
        case "$?" in
        143) true ;; # POSIX w/ SIGTERM=15
+       271) true ;; # ksh w/ SIGTERM=15
          3) true ;; # Windows
          *) false ;;
        esac &&

This patch was applied once and forgotten about for 6 six years until
one developer refactored the code in 9b67c9942e (tests: factor
portable signal check out of t0005, 2016-06-30).

"Our developers" did not have to care about code that affected only
one shell. Not since 2010, not since 2016, not even today.

Even the original author admitted he didn't understand how this code
truly interacted in other situations [1]:

> Frankly, I don't know how bash's 'kill -TERM' and a Windows program
> interact.  I've avoided this topic like the plague so far.

It's not true that applying patches to fix a situation for a specific
shell causes a hypothetical burden to our developers to magically
appear.

In reality the patch is applied once and forgotten about it until a)
another developer stumbles upon a similar problem, or b) another
developer stumbles upon that specific code.

No developer cared about 0e418e568f being applied. It fixed the
situation for one shell, it didn't affect other shells negatively, and
that's all anyone needed to know.

[1] https://lore.kernel.org/git/576DA6FB.1050108@kdbg.org
-- 
Felipe Contreras
Previous: Junio C Hamano
Message 29 of 29 in “test: make the test suite work with zsh”
  1. 0/6 test: make the test suite work with zshFelipe Contreras, Mar 28, 2023
  2. 3/6 test: avoid `options` variableFelipe Contreras, Mar 28, 2023
  3. 1/6 test: fix build for zshFelipe Contreras, Mar 28, 2023
  4. 5/6 test: hack for zshFelipe Contreras, Mar 28, 2023
  5. Felipe ContrerasMar 30, 2023
  6. 6/6 mergetools: vimdiff: check for empty fieldsFelipe Contreras, Mar 28, 2023
  7. 2/6 test: avoid `stat` variableFelipe Contreras, Mar 28, 2023
  8. Ævar Arnfjörð BjarmasonMar 29, 2023
  9. Taylor BlauApr 1, 2023
  10. Felipe ContrerasApr 1, 2023
  11. 4/6 test: avoid `path` variableFelipe Contreras, Mar 28, 2023
  12. brian m. carlsonMar 29, 2023
  13. Felipe ContrerasMar 29, 2023
  14. Ævar Arnfjörð BjarmasonMar 29, 2023
  15. Felipe ContrerasMar 29, 2023
  16. Felipe ContrerasMar 30, 2023
  17. Junio C HamanoMar 29, 2023
  18. Felipe ContrerasMar 29, 2023
  19. Junio C HamanoMar 30, 2023
  20. Felipe ContrerasMar 30, 2023
  21. Taylor BlauApr 1, 2023
  22. Felipe ContrerasApr 1, 2023
  23. Junio C HamanoApr 1, 2023
  24. Felipe ContrerasApr 1, 2023
  25. Taylor BlauApr 1, 2023
  26. Felipe ContrerasApr 1, 2023
  27. brian m. carlsonMar 29, 2023
  28. Junio C HamanoMar 30, 2023
  29. Felipe ContrerasMar 30, 2023

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.