unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH 1/6] perf-test: use 'eval' in memory_run
Date: Sat, 18 Mar 2017 23:04:24 +0200	[thread overview]
Message-ID: <m2shmaxpnr.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <20170318175038.15887-2-david@tethera.net>

On Sat, Mar 18 2017, David Bremner <david@tethera.net> wrote:

> This allows the use of redirection in the tests
> ---
>  performance-test/perf-test-lib.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test-lib.sh
> index 00d2f1c6..c89d5aab 100644
> --- a/performance-test/perf-test-lib.sh
> +++ b/performance-test/perf-test-lib.sh
> @@ -149,7 +149,7 @@ memory_run ()
>  
>      printf "[ %d ]\t%s\n" $test_count "$1"
>  
> -    NOTMUCH_TALLOC_REPORT="$talloc_log" valgrind --leak-check=full --log-file="$log_file" $2
> +    NOTMUCH_TALLOC_REPORT="$talloc_log" eval "valgrind --leak-check=full --log-file='$log_file' $2"

For the record, this would have worked w/o the double quotes (which I
thought would have not), but it is somewhat safer for someone to copy
this to some use. If there were literal '>'s in the line, then those
redirections would have been done in 'eval' (with these quotes). Without
quotes, '>' redirection would have been done before 'eval'. But 
when '>' is given in variable $2, the redirection would have been
done in eval (after shell has expanded the line for it) in any case.

all that said, this particular change OK...

Tomi

>  
>      awk '/LEAK SUMMARY/,/suppressed/ { sub(/^==[0-9]*==/," "); print }' "$log_file"
>      echo

  reply	other threads:[~2017-03-18 21:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-18 17:50 memory leak cleanup for notmuch show David Bremner
2017-03-18 17:50 ` [PATCH 1/6] perf-test: use 'eval' in memory_run David Bremner
2017-03-18 21:04   ` Tomi Ollila [this message]
2017-03-18 17:50 ` [PATCH 2/6] perf-test: add simple memory tests for notmuch-show David Bremner
2017-03-18 17:50 ` [PATCH 3/6] fix memory leaks in notmuch-show.c:format_headers_sprinter() David Bremner
2017-03-18 17:50 ` [PATCH 4/6] cli/show: fix some memory leaks in format_part_text David Bremner
2017-03-18 17:50 ` [PATCH 5/6] cli/show: fix usage of g_mime_content_type_to_string David Bremner
2017-03-18 17:50 ` [PATCH 6/6] cli/show: unref crlf filter David Bremner
2017-03-18 20:03   ` [PATCH] perf-test/mem: add simple memory tests for notmuch search David Bremner
2017-03-18 21:11 ` memory leak cleanup for notmuch show Tomi Ollila
2017-03-19  0: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=m2shmaxpnr.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=david@tethera.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).