From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Tomi Ollila <tomi.ollila@iki.fi>, Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH v2 2/2] test: replace use of gdb with LD_PRELOAD shims in T070-insert.sh
Date: Sun, 16 Jun 2019 12:38:54 -0400 [thread overview]
Message-ID: <87h88p1o4h.fsf@fifthhorseman.net> (raw)
In-Reply-To: <m2fto9u5ie.fsf@guru.guru-group.fi>
[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]
On Sun 2019-06-16 14:35:53 +0300, Tomi Ollila wrote:
> On Mon, Jun 10 2019, Daniel Kahn Gillmor wrote:
>> + test_expect_code 1 "$(printf "notmuch_with_shim shim-%q insert < %q" "$code" "$gen_msg_filename")"
>
> does test_expect_code 1 'notmuch_with_shim shim-$code insert < "$gen_msg_filename"'
hm, i think your proposal would do the right thing, but if someone was
to "clobber those variables in the call path" as you put it -- or if it
ended up getting evaluated by a subshell that didn't have those
variables exported, it would fail.
Furthermore, when test_expect_code fails, at least one of the failure
paths prints out the literal string that it received as the "$2"
argument, so it's nice to have the literal string fully-expanded before
it gets passed to test_expect_code.
So for both of those reasons (fragility of variables in the callpath;
and clearer test failure reporting) i prefer the way i've done it even
if it is a bit harder to read.
I won't fight too hard about this though, i've got other things on my
plate with a higher priority. So if you want to offer a third variant
of bremner's patches with your preferred approach, i'll probably be ok
with it.
--dkg
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
next prev parent reply other threads:[~2019-06-17 3:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-26 13:08 start to replace dependence of test suite on gdb with LD_PRELOAD shims David Bremner
2019-05-26 13:08 ` [PATCH 1/2] test: provide machinery to make and use test_shims David Bremner
2019-06-25 21:05 ` Tomi Ollila
2019-06-25 23:33 ` Daniel Kahn Gillmor
2019-05-26 13:08 ` [PATCH 2/2] test: replace use of gdb with LD_PRELOAD shims in T070-insert.sh David Bremner
2019-06-09 22:47 ` Daniel Kahn Gillmor
2019-06-10 21:34 ` Ralph Seichter
2019-06-14 11:16 ` David Bremner
2019-06-24 18:22 ` Daniel Kahn Gillmor
2019-06-24 18:44 ` Tomi Ollila
2019-06-24 20:12 ` Daniel Kahn Gillmor
2019-06-24 19:56 ` Ralph Seichter
2019-06-10 0:52 ` Daniel Kahn Gillmor
2019-06-10 0:53 ` [PATCH v2 " Daniel Kahn Gillmor
2019-06-16 11:35 ` Tomi Ollila
2019-06-16 16:38 ` Daniel Kahn Gillmor [this message]
2019-06-26 16:23 ` v3 of test speedup by replacing gdb with LD_PRELOAD Daniel Kahn Gillmor
2019-06-26 16:23 ` [PATCH v3 1/2] test: provide machinery to make and use test_shims Daniel Kahn Gillmor
2019-06-26 16:23 ` [PATCH v3 2/2] test: replace use of gdb with LD_PRELOAD shims in T070-insert.sh Daniel Kahn Gillmor
2019-06-26 19:06 ` v3 of test speedup by replacing gdb with LD_PRELOAD Tomi Ollila
2019-06-29 19:14 ` 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=87h88p1o4h.fsf@fifthhorseman.net \
--to=dkg@fifthhorseman.net \
--cc=notmuch@notmuchmail.org \
--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).