From: David Bremner <david@tethera.net>
To: David Bremner <david@tethera.net>,
Maarten Aertsen <sagi-notmuch@rtsn.nl>,
Notmuch Mail <notmuch@notmuchmail.org>
Cc: Tomi Ollila <tomi.ollila@iki.fi>
Subject: [PATCH 1/3] test: gdb insert: redirect input inside gdb script
Date: Mon, 28 Nov 2016 18:12:29 -0400 [thread overview]
Message-ID: <20161128221231.25528-2-david@tethera.net> (raw)
In-Reply-To: <20161128221231.25528-1-david@tethera.net>
From: Tomi Ollila <tomi.ollila@iki.fi>
Running `gdb command < input` is not as reliable way to give input
to the command (some installations of gdb consume it). Use "set args"
gdb command to have input redirected at gdb 'run' time.
---
test/T070-insert.sh | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/test/T070-insert.sh b/test/T070-insert.sh
index c2485bb..43b3abc 100755
--- a/test/T070-insert.sh
+++ b/test/T070-insert.sh
@@ -202,13 +202,15 @@ end
run
EOF
test_begin_subtest "error exit when add_message returns $code"
-gdb --batch-silent --return-child-result -x index-file-$code.gdb \
- --args notmuch insert < $gen_msg_filename
+gdb --batch-silent --return-child-result \
+ -ex "set args insert < $gen_msg_filename" \
+ -x index-file-$code.gdb notmuch
test_expect_equal $? 1
test_begin_subtest "success exit with --keep when add_message returns $code"
-gdb --batch-silent --return-child-result -x index-file-$code.gdb \
- --args notmuch insert --keep < $gen_msg_filename
+gdb --batch-silent --return-child-result \
+ -ex "set args insert --keep < $gen_msg_filename" \
+ -x index-file-$code.gdb notmuch
test_expect_equal $? 0
done
--
2.10.2
next prev parent reply other threads:[~2016-11-28 22:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-24 15:48 notmuch insert --keep fails in parallel w/ notmuch new Maarten Aertsen
2016-01-26 15:09 ` David Bremner
2016-02-07 21:13 ` [PATCH] cli: avoid non-zero exits in notmuch insert --keep Maarten Aertsen
2016-02-08 11:56 ` David Bremner
2016-11-28 12:16 ` [PATCH 1/2] cli/insert: delay database open until after writing mail file David Bremner
2016-11-28 12:16 ` [PATCH 2/2] cli/insert: return EX_TEMPFAIL for some errors David Bremner
2016-11-28 12:22 ` David Bremner
2016-11-28 22:12 ` v2 of insert tempfail series David Bremner
2016-11-28 22:12 ` David Bremner [this message]
2016-11-28 22:12 ` [PATCH 2/3] cli/insert: delay database open until after writing mail file David Bremner
2016-11-28 22:12 ` [PATCH 3/3] cli/insert: return EX_TEMPFAIL for some errors David Bremner
2016-12-04 20:51 ` v2 of insert tempfail series Tomi Ollila
2016-12-07 11:27 ` NEWS/docs for insert tempfail changes David Bremner
2016-12-07 11:27 ` [PATCH 1/2] cli/insert: document the use of EX_TEMPFAIL David Bremner
2016-12-15 13:01 ` David Bremner
2016-12-07 11:27 ` [PATCH 2/2] NEWS: news for notmuch-insert error handling David Bremner
2016-12-10 19:26 ` NEWS/docs for insert tempfail changes Tomi Ollila
2016-11-28 12:23 ` [PATCH 1/2] cli/insert: delay database open until after writing mail file 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=20161128221231.25528-2-david@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
--cc=sagi-notmuch@rtsn.nl \
--cc=tomi.ollila@iki.fi \
/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).