public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] testrun.sh: Support passing strace and valgrind arguments
Date: Thu,  2 Jun 2022 16:38:17 +0000 (GMT)	[thread overview]
Message-ID: <20220602163817.EC736395C032@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bb8887379f59a3efde90569acd47e63e0f6a3863

commit bb8887379f59a3efde90569acd47e63e0f6a3863
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Jun 2 17:41:33 2022 +0200

    testrun.sh: Support passing strace and valgrind arguments
    
    This is a bit of a hack, but it works quite well in practice.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

Diff:
---
 Makefile | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index b1454882bd..a9722a161c 100644
--- a/Makefile
+++ b/Makefile
@@ -143,7 +143,8 @@ Usage: $$0 [OPTIONS] <program> [ARGUMENTS...]
 
   --tool=TOOL  Run with the specified TOOL. It can be strace, rpctrace,
                valgrind or container. The container will run within
-               support/test-container.
+               support/test-container.  For strace and valgrind,
+               additional arguments can be passed after the tool name.
 EOF
 
   exit 1
@@ -174,16 +175,16 @@ case "$$toolname" in
     exec $(subst $(common-objdir),"$${builddir}", $(test-program-prefix)) \
       $${1+"$$@"}
     ;;
-  strace)
-    exec strace $(patsubst %, -E%, $(run-program-env)) \
+  strace*)
+    exec $$toolname $(patsubst %, -E%, $(run-program-env)) \
       $(test-via-rtld-prefix) $${1+"$$@"}
     ;;
   rpctrace)
     exec rpctrace $(patsubst %, -E%, $(run-program-env)) \
       $(test-via-rtld-prefix) $${1+"$$@"}
     ;;
-  valgrind)
-    exec env $(run-program-env) valgrind $(test-via-rtld-prefix) $${1+"$$@"}
+  valgrind*)
+    exec env $(run-program-env) $$toolname $(test-via-rtld-prefix) $${1+"$$@"}
     ;;
   container)
     exec env $(run-program-env) $(test-via-rtld-prefix) \


                 reply	other threads:[~2022-06-02 16:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

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

  git send-email \
    --in-reply-to=20220602163817.EC736395C032@sourceware.org \
    --to=fw@sourceware.org \
    --cc=glibc-cvs@sourceware.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.
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).