Subject: Re: [PATCH v7 4/7] progress.c tests: test some invalid usage

From: Junio C Hamano <[email-masked]>
Date: Mon, 03 Jan 2022 15:48:00 -0800

Johannes Altmanninger <[email-masked]> writes:

>> +	grep region_enter.*progress trace-start.event &&
>> +	! grep region_leave.*progress trace-start.event
>
> should "!" be "test_must_fail"? Same below.

The answer is no.  The main difference between test_must_fail and
"!" is that the former is designed to catch ungraceful death (e.g.
by segfault) and to be used to expect controlled failure from OUR
programs (i.e. "git" and "test-tool" invocations).  We are not in
the business of catching segfaulting bug in system's "grep", so it
is perfectly fine to use "!" here.