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

Re: [PATCH v1 1/2] implement test_might_fail using a refactored test_must_fail

From
Jeff King <peff@peff.net>
Date
Nov 28, 2015, 17:03 UTC
Message-ID
<20151128170355.GB27264@sigill.intra.peff.net>
In-Reply-To
<56584E92.1030103@ramsayjones.plus.com>
On Fri, Nov 27, 2015 at 12:37:38PM +0000, Ramsay Jones wrote:
Show 11 quoted lines
> > -	if test $exit_code = 0; then
> > +	if ! list_contains "$_test_ok" success && test "$exit_code" -eq 0
> > +	then
> 
> minor nit:
> 
> I would prefer this was 'if test $exit_code -eq 0 && ! list_contains ...'
> 
> ie. the test on exit code comes first (and no need for the double quotes).
> The whole if..elif.. chain is about testing the exit code, with a couple
> of exceptions ...

I agree, it makes the logic a bit easier to follow. I've tweaked it while applying; no need to re-send.

> The same comment applies to the second patch with exit code 141/SIGPIPE.
Got that one, too.
-Peff
Previous: Ramsay JonesNext: larsxschneider@gmail.com
Message 4 of 7 in “test-must-fail-sigpipe”
  1. 0/2 test-must-fail-sigpipelarsxschneider@gmail.com, Nov 27, 2015
  2. 1/2 implement test_might_fail using a refactored test_must_faillarsxschneider@gmail.com, Nov 27, 2015
  3. Ramsay JonesNov 27, 2015
  4. Jeff KingNov 28, 2015
  5. 2/2 add "ok=sigpipe" to test_must_fail and use it to fix flaky testslarsxschneider@gmail.com, Nov 27, 2015
  6. Jeff KingNov 28, 2015
  7. Lars SchneiderDec 1, 2015

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.