Subject: Re: [PATCH 03/10] t/perf/fsmonitor: improve error message if typoing hook name

From: Junio C Hamano <[email-masked]>
Date: Mon, 26 Oct 2020 14:14:00 -0700

"Nipunn Koorapati via GitGitGadget" <[email-masked]> writes:

> From: Nipunn Koorapati <[email-masked]>
>
> Previously - it would silently run the perf suite w/o using
> fsmonitor - fsmonitor errors are not hard failures.
> Now it errors loudly.
>
> GIT_PERF_7519_FSMONITOR="$HOME/rs-git-fsmonitorr"
> ./p7519-fsmonitor.sh -i -v
>
> fatal: cannot run /home/nipunn/rs-git-fsmonitorr:
> No such file or directory
> not ok 2 - setup for fsmonitor
>
> Signed-off-by: Nipunn Koorapati <[email-masked]>
> ---
>  t/perf/p7519-fsmonitor.sh | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh
> index 4030f569cf..88b3717e2a 100755
> --- a/t/perf/p7519-fsmonitor.sh
> +++ b/t/perf/p7519-fsmonitor.sh
> @@ -126,7 +126,9 @@ test_expect_success "setup for fsmonitor" '
>  	fi &&
>  
>  	git config core.fsmonitor "$INTEGRATION_SCRIPT" &&
> -	git update-index --fsmonitor &&
> +	git update-index --fsmonitor 2>error &&
> +	cat error &&
> +	[ ! -s error ] && # ensure no silent error

I usually do not review or write t/perf/, but is test_must_be_empty
available to you at this point?

>  	git status  # Warm caches
>  '