unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
	Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH 1/2] Ensure that "notmuch reply" succeeds during testing.
Date: Fri, 14 Jul 2017 15:04:30 -0300	[thread overview]
Message-ID: <87fudyq4i9.fsf@tesseract.cs.unb.ca> (raw)
In-Reply-To: <87pod36j4t.fsf@fifthhorseman.net>

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

> On Fri 2017-07-14 11:42:43 -0300, David Bremner wrote:
>> Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:
>>> -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.
>
> redirecting stdin as well?  i'm not sure what you'd do with stdin.
> makes sense for for stderr, though i don't know the test suite well
> enough to instrument it The Right Way™.  I'm happy to be pointed to an
> example, though.

err. stdout.

I guess I was thinking something like the test "List all items" in
T030-config.sh.

Alternatively, it's simpler to add 2>&1 (see e.g. T050-new.sh) inside
the $().

Maybe something like (untested)

output=$(notmuch reply  id:${gen_msg_id} 2>&1 && echo OK)

to have postive confirmation of the exit value, as well as any stderr
output.

d

  reply	other threads:[~2017-07-14 18:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-14 13:09 [PATCH 1/2] Ensure that "notmuch reply" succeeds during testing Daniel Kahn Gillmor
2017-07-14 13:09 ` [PATCH 2/2] Add additional munged reply-to tests Daniel Kahn Gillmor
2017-07-14 13:26   ` Daniel Kahn Gillmor
2017-07-14 14:42 ` [PATCH 1/2] Ensure that "notmuch reply" succeeds during testing David Bremner
2017-07-14 17:08   ` Daniel Kahn Gillmor
2017-07-14 18:04     ` David Bremner [this message]
2017-07-14 20:14       ` [PATCH v2 " Daniel Kahn Gillmor
2017-07-14 20:14         ` [PATCH v2 2/2] Add additional munged reply-to tests Daniel Kahn Gillmor
2017-07-14 22:03           ` [PATCH] Avoid crashes in "notmuch reply" with gmime 3.0 when reply-to == sender Daniel Kahn Gillmor
2017-07-14 22:13             ` Daniel Kahn Gillmor
2017-07-14 22:53               ` Daniel Kahn Gillmor
2017-07-15 11:47                 ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fudyq4i9.fsf@tesseract.cs.unb.ca \
    --to=david@tethera.net \
    --cc=dkg@fifthhorseman.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).