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

Re: [PATCH 00/25] fix buggy tests, modernize tests, fix broken &&-chains

From
Stefan Beller <sbeller@google.com>
Date
Jul 2, 2018, 18:27 UTC
Message-ID
<CAGZ79kZXhZyhDL_+cFK6BzL-RL7Ac0zKeKux97v9shc+qm+nOA@mail.gmail.com>
In-Reply-To
<20180702002405.3042-1-sunshine@sunshineco.com>
On Sun, Jul 1, 2018 at 5:24 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 62 quoted lines
>
> This series fixes several buggy tests which went undetected due to
> broken &&-chains in subshells, modernizes some tests to take advantage
> of test functions (test_might_fail(), test_write_lines(), etc.), and
> fixes a lot of broken &&-chains in subshells. It applies atop
> 'master'. Happily, there are no broken &&-chains in subshells in any
> in-flight topic.
>
> It is split out from an earlier series[1] which additionally extended
> --chain-lint to work within subshells. I decided to make this an
> independent series because these (hopefully) non-controversial changes
> all stand on their own merit, and because I don't want to flood the list
> repeatedly with this lengthy series as I re-roll the "extend
> --chain-lint to work in subshells" functionality from [1].
>
> To ease review burden, I largely avoided noisy modernizations and
> cleanups, and limited changes to merely adding "&&" even when some other
> transformation would have made the fix nicer overall. (For example, I
> resisted the urge to replace a series of 'echo' statements with a simple
> here-doc.)
>
> Changes since [1]:
>
> * Found and fixed more &&-chain breakage, and converted a couple more
>   'unset' instances (which were hidden behind a MINGW prerequisite) to
>   sane_unset().
>
> * Rewrote commit messages to sell changes on their own merit rather than
>   leaning on --chain-lint as a crutch. (junio, jrnieder)
>
> * Changed a modernization/cleanup to use "! non-git-command" rather than
>   test_must_fail(), moving it to its own patch in the process. (j6t)
>
> * Changed "printf '%s\n'" idiom to test_write_lines(). (junio)
>
> * Incorporated Stefan's fix[2] for a broken 't/lib-submodule-update'
>   test since my interpretation of the problem was incorrect.
>
> * Converted a subshell 'echo' sequence to write_script().
>
> * Dropped patches which existed primarily to pacify --chain-lint; they
>   are no longer needed since I re-wrote the "linter" to detect &&-chain
>   breakage itself (by pure textual inspection) rather than by
>   incorporating subshell bodies into the main &&-chain:
>
>   t0001: use "{...}" block around "||" expression rather than subshell
>   t3303: use standard here-doc tag "EOF" to avoid fooling --chain-lint
>   t9104: use "{...}" block around "||" expression rather than subshell
>   t9401: drop unnecessary nested subshell
>
> * Dropped a patch which pretty much duplicated Junio's 037714252f
>   (tests: clean after SANITY tests, 2018-06-15), which graduated to
>   'master':
>
>   t7508: use test_when_finished() instead of managing exit code manually
>
> An interdiff against [1] is below, although I stripped out all the noisy
> "printf '%s\n'" to test_write_lines() differences, of which there were a
> lot, since they drowned out the other more significant changes.
>
> Thanks to Elijah, Hannes, Jonathan Nieder, Jonathan Tan, Junio, Luke,
> Peff, and Stefan for comments on [1].

Thanks for this series, I think it is good to include it as is and build on top if needed. I had some comments on the earlier part of the series, but that is really just the cherry on top of the cake.

Thanks, Stefan

Previous: Eric SunshineNext: Eric Sunshine
Message 50 of 52 in “fix buggy tests, modernize tests, fix broken &&-chains”
  1. 00/25 fix buggy tests, modernize tests, fix broken &&-chainsEric Sunshine, Jul 2, 2018
  2. 01/25 t: use test_might_fail() instead of manipulating exit code manuallyEric Sunshine, Jul 2, 2018
  3. Stefan BellerJul 2, 2018
  4. Eric SunshineJul 2, 2018
  5. Junio C HamanoJul 3, 2018
  6. 04/25 t: drop unnecessary terminating semicolon in subshellEric Sunshine, Jul 2, 2018
  7. Junio C HamanoJul 3, 2018
  8. 05/25 t/lib-submodule-update: fix "absorbing" testEric Sunshine, Jul 2, 2018
  9. 03/25 t: use sane_unset() rather than 'unset' with broken &&-chainEric Sunshine, Jul 2, 2018
  10. 02/25 t: use test_write_lines() instead of series of 'echo' commandsEric Sunshine, Jul 2, 2018
  11. Stefan BellerJul 2, 2018
  12. 08/25 t5505: modernize and simplify hard-to-digest testEric Sunshine, Jul 2, 2018
  13. 07/25 t5406: use write_script() instead of birthing shell script manuallyEric Sunshine, Jul 2, 2018
  14. 10/25 t7201: drop pointless "exit 0" at end of subshellEric Sunshine, Jul 2, 2018
  15. 11/25 t7400: fix broken "submodule add/reconfigure --force" testEric Sunshine, Jul 2, 2018
  16. Johannes SchindelinJul 16, 2018
  17. Johannes SchindelinJul 16, 2018
  18. Eric SunshineJul 16, 2018
  19. Junio C HamanoJul 16, 2018
  20. Eric SunshineJul 16, 2018
  21. Johannes SchindelinJul 17, 2018
  22. Junio C HamanoJul 17, 2018
  23. 12/25 t7810: use test_expect_code() instead of hand-rolled comparisonEric Sunshine, Jul 2, 2018
  24. Stefan BellerJul 2, 2018
  25. Eric SunshineJul 2, 2018
  26. 15/25 t0000-t0999: fix broken &&-chainsEric Sunshine, Jul 2, 2018
  27. 16/25 t1000-t1999: fix broken &&-chainsEric Sunshine, Jul 2, 2018
  28. 17/25 t2000-t2999: fix broken &&-chainsEric Sunshine, Jul 2, 2018
  29. 25/25 t9119: fix broken &&-chainsEric Sunshine, Jul 2, 2018
  30. 24/25 t9000-t9999: fix broken &&-chainsEric Sunshine, Jul 2, 2018
  31. 23/25 t7000-t7999: fix broken &&-chainsEric Sunshine, Jul 2, 2018
  32. 22/25 t6000-t6999: fix broken &&-chainsEric Sunshine, Jul 2, 2018
  33. 21/25 t5000-t5999: fix broken &&-chainsEric Sunshine, Jul 2, 2018
  34. SZEDER GáborJul 12, 2018
  35. Eric SunshineJul 12, 2018
  36. Jeff KingJul 12, 2018
  37. Junio C HamanoJul 12, 2018
  38. Junio C HamanoJul 12, 2018
  39. Eric SunshineJul 12, 2018
  40. Junio C HamanoJul 12, 2018
  41. Eric SunshineJul 12, 2018
  42. SZEDER GáborJul 17, 2018
  43. 20/25 t4000-t4999: fix broken &&-chainsEric Sunshine, Jul 2, 2018
  44. 19/25 t3030: fix broken &&-chainsEric Sunshine, Jul 2, 2018
  45. 18/25 t3000-t3999: fix broken &&-chainsEric Sunshine, Jul 2, 2018
  46. 14/25 t9814: simplify convoluted check that command correctly errors outEric Sunshine, Jul 2, 2018
  47. 09/25 t6036: fix broken "merge fails but has appropriate contents" testsEric Sunshine, Jul 2, 2018
  48. 06/25 t5405: use test_must_fail() instead of checking exit code manuallyEric Sunshine, Jul 2, 2018
  49. 13/25 t9001: fix broken "invoke hook" testEric Sunshine, Jul 2, 2018
  50. Stefan BellerJul 2, 2018
  51. Eric SunshineJul 2, 2018
  52. Junio C HamanoJul 3, 2018

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.