From: Junio C Hamano Date: Mon, 01 Apr 2013 01:50:11 GMT Subject: Re: [PATCH v4 0/6] Support triangular workflows Message-ID: <7vli93nhnw.fsf@alter.siamese.dyndns.org> In-Reply-To: <20130331214318.GA24646@sigill.intra.peff.net> 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".