Re: [PATCH v1 3/7] t1010: assert empty output of mktree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrei Rybak <rybak.a.v@xxxxxxxxx> writes:

>  test_expect_success 'mktree refuses to read ls-tree -r output (1)' '
> -	test_must_fail git mktree <all >actual
> +	test_must_fail git mktree <all >actual &&
> +	test_must_be_empty actual
>  '
>  
>  test_expect_success 'mktree refuses to read ls-tree -r output (2)' '
> -	test_must_fail git mktree <all.withsub >actual
> +	test_must_fail git mktree <all.withsub >actual &&
> +	test_must_be_empty actual
>  '

I am ambivalent.  As long as a failing command signals its failure
with its non-zero exit status value, the consumer of the output
should not blindly use the output from such a failing command.  Is
there a strong reason why we want users rely on the command to be
silent when it fails?

An obvious alternative is to stop producing "actual" file, and it
might be a better idea; unless there is a good reason why we should
expect the command to be silent, that is.

Thanks.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux