Jeff King <> writes:

> 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".

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to