Re: [PATCHv2 3/4] run-command: help callers distinguish errors
- From
Jeff King <peff@peff.net>
- Date
- Jan 28, 2009, 07:47 UTC
- Message-ID
- <20090128074732.GC31951@coredump.intra.peff.net>
- In-Reply-To
- <20090128074334.GB31951@coredump.intra.peff.net>
On Wed, Jan 28, 2009 at 02:43:34AM -0500, Jeff King wrote:
Show 8 quoted lines
> On Wed, Jan 28, 2009 at 02:36:39AM -0500, Jeff King wrote: > > > +#define IS_RUN_COMMAND_ERR(x) (x >= ERR_RUN_COMMAND_FORK) > > <sigh> This should be "<= -ERR_RUN_COMMAND_FORK", since we expect the > negated status. > > Maybe it is time I wrote a test for a failed external.
Hmm. Actually, it is hard to write a test case for this; it only triggers if we actually have an error running a program, like fork() failing.
-Peff