From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id EC736395C032; Thu, 2 Jun 2022 16:38:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC736395C032 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc] testrun.sh: Support passing strace and valgrind arguments X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/master X-Git-Oldrev: 4b527650e0d559a5f693275c598667e06cd6455c X-Git-Newrev: bb8887379f59a3efde90569acd47e63e0f6a3863 Message-Id: <20220602163817.EC736395C032@sourceware.org> Date: Thu, 2 Jun 2022 16:38:17 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2022 16:38:18 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bb8887379f59a3efde90569acd47e63e0f6a3863 commit bb8887379f59a3efde90569acd47e63e0f6a3863 Author: Florian Weimer 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 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] [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) \