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

Re: [PATCH v4 0/6] Support triangular workflows

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 1, 2013, 01:50 UTC
Message-ID
<7vli93nhnw.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20130331214318.GA24646@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> On Mon, Apr 01, 2013 at 02:21:22AM +0530, Ramkumar Ramachandra wrote:
>
>> Jeff King wrote:
>> > [...]
>> 
>> So, you're saying: don't test compound statements for failure, since
>> anything in the chain could fail and propagate failure.  I should only
>> test simple git-foo commands for failure?
>
> Right.

I think another thing to keep in mind is that "test_must_fail" is used only to check for an expected failure from git-foo commands, not for a random command (or sequence of commands).

The primary point of test_must_fail is not to declare _any_ failure as "Oh, good, I wanted see it to fail and it returned non-zero exit status so I am happy", but exclude uncontrolled failures, by saying "Yuck, it returned non-zero exit status, but it died by signal (e.g. SEGV), which is not the way I wanted to see it die".

Previous: Jeff King
Message 18 of 18 in “Support triangular workflows”
  1. 0/6 Support triangular workflowsRamkumar Ramachandra, Mar 28, 2013
  2. 1/6 remote.c: simplify a bit of code using git_config_string()Ramkumar Ramachandra, Mar 28, 2013
  3. 2/6 t5516 (fetch-push): update test descriptionRamkumar Ramachandra, Mar 28, 2013
  4. 3/6 t5516 (fetch-push): drop implicit arguments from helper functionsRamkumar Ramachandra, Mar 28, 2013
  5. 4/6 remote.c: introduce a way to have different remotes for fetch/pushRamkumar Ramachandra, Mar 28, 2013
  6. 5/6 remote.c: introduce remote.pushdefaultRamkumar Ramachandra, Mar 28, 2013
  7. 6/6 remote.c: introduce branch.<name>.pushremoteRamkumar Ramachandra, Mar 28, 2013
  8. Junio C HamanoMar 28, 2013
  9. Jeff KingMar 28, 2013
  10. Junio C HamanoMar 28, 2013
  11. Ramkumar RamachandraMar 31, 2013
  12. Junio C HamanoApr 1, 2013
  13. Junio C HamanoApr 1, 2013
  14. Junio C HamanoApr 1, 2013
  15. Junio C HamanoApr 1, 2013
  16. Ramkumar RamachandraMar 31, 2013
  17. Jeff KingMar 31, 2013
  18. Junio C HamanoApr 1, 2013

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.