[PATCH 1/2] Ensure that "notmuch reply" succeeds during testing.

David Bremner david at tethera.net
Fri Jul 14 07:42:43 PDT 2017


Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:

> In some (bad!) cases, "notmuch reply" might fail, or might even
> segfault.  If this happens, it indicates a bug, and the test suite
> should notice it.
> ---
>  test/T220-reply.sh | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/test/T220-reply.sh b/test/T220-reply.sh
> index 17741e0d..b12109bf 100755
> --- a/test/T220-reply.sh
> +++ b/test/T220-reply.sh
> @@ -9,7 +9,7 @@ add_message '[from]="Sender <sender at example.com>"' \
>  	    '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
>  	    '[body]="basic reply test"'
>  
> -output=$(notmuch reply id:${gen_msg_id})
> +output=$(notmuch reply id:${gen_msg_id} || echo failed)

I wonder if we're going to touch this code if we should DTRT™ and switch
to redirecting stdin and stderr to a file. Then when we have failures we
will at least have a little bit more information, especially in user bug
reports.

d





More information about the notmuch mailing list