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

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

Date: Fri, 14 Jul 2017 11:42:43 -0300

To: Daniel Kahn Gillmor, Notmuch Mail

Cc:

From: David Bremner


Daniel Kahn Gillmor <dkg@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@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




Thread: