From patchwork Thu Jun 2 15:50:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1638403 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=c8tD1Epe; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LDVqY672Gz9s75 for ; Fri, 3 Jun 2022 01:51:21 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 46756395A41A for ; Thu, 2 Jun 2022 15:51:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46756395A41A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1654185078; bh=qYZvzBYscE3fDlotjLqhOa1OTipUHseR6kIR6asCOqU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=c8tD1Epe1GkDGw3GHn2rKYVEWo9VfY0DoPzxQhYZ5OSJ1NUXvkV2Dbu0H/1M6DAkE Z7UUa5zQd46vXBMrGfGgfLGDznaYipkbb9AAgCEBky2u25EHXEQ5r4Q3aFug6gTBHc TSvY/44GRQ8Wuk48Gl78nKnNTAwRg2iAZOLjOLTc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id D60293836E61 for ; Thu, 2 Jun 2022 15:50:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D60293836E61 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-554-mL9l9OO_MZi1TPCMi7cy-w-1; Thu, 02 Jun 2022 11:50:56 -0400 X-MC-Unique: mL9l9OO_MZi1TPCMi7cy-w-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DD01F101A56C for ; Thu, 2 Jun 2022 15:50:55 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.194.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 78224492CA2 for ; Thu, 2 Jun 2022 15:50:55 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH] testrun.sh: Support passing strace and valgrind arguments Date: Thu, 02 Jun 2022 17:50:53 +0200 Message-ID: <87bkvbxdwi.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" This is a bit of a hack, but it works quite well in practice. Reviewed-by: Adhemerval Zanella --- 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) \