Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp44219ybj; Fri, 8 May 2020 06:11:41 -0700 (PDT) X-Google-Smtp-Source: APiQypIyDkD6hVzYiOlaZ0nkPT73heg5Zc3QFPkHUxjxRQwg0VzIwuYHrfa5C9MjkwwQ+YF223sS X-Received: by 2002:a17:906:35cd:: with SMTP id p13mr1925969ejb.206.1588943501741; Fri, 08 May 2020 06:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943501; cv=none; d=google.com; s=arc-20160816; b=KUh5L4mFQZFa+oUNeBC77b/MXsqQkc3pyFOyejcJCyDozuVI0CbSOl53Z8fFIVc9gN PQPuMZ3QlWFadgdkZad6VOeF81ZJclSk2HbFyReFKuf2cqsD9xfl61P2y0xV50fvI7Aq StOtg/5X201o1Gt8jTDipJcAbwHGsI58IuMIVXGe0hjYAMUohXk11RFX+26e4g5tvZ/9 HG38avIU/5TtO9PekeqeYKFBVXctnaoV6Rgey5LiXRG4PpR/T8rAPCWYOCvHTIqDbcVF 6DDdMZwu2t7wjxlk5FjESjlVTtpuy68KWKCYx1IDqijuNGVH/s9abEftHUuaMDldoZUN gUqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=3M+rouH50a8LF60rGKnGKs8egGlTcvILV6mnCsIbnxQ=; b=ax405+8GJM760LU4IvEwbI6OoKao2V37uIh0LtOVmX+hpJys5eiO26pXarqwYZ26GO CbMavroC+wclSZRJsRGarqj+UqhnQ4yYrg1rfQObftj//QV02A3o27sWdhiryFJhLW93 rAjVfI47alQTe9VbSrQgY0sI35PGo861Lh9CgGN0y1wQlx9vyuG0YTb9mwg29qPbULEe WNtLyM7Gudg6Lhrhu7e+7tDhJ9ceHYIlEhBAAhCiZU0uWZYz2VcIO5N7u4mL0VPBO7k2 lq/IQ+zgB4GG10RVTDV9spYYxNBgPF4jU0EctO6swgMnokgQEJoAJ2+gXzDYv9FLUlvA PBgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j2si941625edk.17.2020.05.08.06.11.18; Fri, 08 May 2020 06:11:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729053AbgEHNH4 (ORCPT + 99 others); Fri, 8 May 2020 09:07:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730559AbgEHNFo (ORCPT ); Fri, 8 May 2020 09:05:44 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40F09C05BD09; Fri, 8 May 2020 06:05:44 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jX2gu-0007lm-KB; Fri, 08 May 2020 15:05:24 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 5735A1C0852; Fri, 8 May 2020 15:05:08 +0200 (CEST) Date: Fri, 08 May 2020 13:05:08 -0000 From: "tip-bot2 for Kajol Jain" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf tests expr: Added test for runtime param in metric expression Cc: Kajol Jain , Jiri Olsa , Alexander Shishkin , Andi Kleen , Anju T Sudhakar , Benjamin Herrenschmidt , "Greg Kroah-Hartman" , Jin Yao , Joe Mario , Kan Liang , Madhavan Srinivasan , Mamatha Inamdar , Mark Rutland , Michael Ellerman , Michael Petlan , Namhyung Kim , Paul Mackerras , Peter Zijlstra , Ravi Bangoria , Sukadev Bhattiprolu , Thomas Gleixner , linuxppc-dev@lists.ozlabs.org, Arnaldo Carvalho de Melo , x86 , LKML In-Reply-To: <20200401203340.31402-6-kjain@linux.ibm.com> References: <20200401203340.31402-6-kjain@linux.ibm.com> MIME-Version: 1.0 Message-ID: <158894310825.8414.975904064383982223.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the perf/core branch of tip: Commit-ID: 9022608ec5babbb0fa631234098d52895e7e34d8 Gitweb: https://git.kernel.org/tip/9022608ec5babbb0fa631234098d52895e7e34d8 Author: Kajol Jain AuthorDate: Thu, 02 Apr 2020 02:03:38 +05:30 Committer: Arnaldo Carvalho de Melo CommitterDate: Thu, 30 Apr 2020 10:48:33 -03:00 perf tests expr: Added test for runtime param in metric expression Added test case for parsing "?" in metric expression. Signed-off-by: Kajol Jain Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Anju T Sudhakar Cc: Benjamin Herrenschmidt Cc: Greg Kroah-Hartman Cc: Jin Yao Cc: Joe Mario Cc: Kan Liang Cc: Madhavan Srinivasan Cc: Mamatha Inamdar Cc: Mark Rutland Cc: Michael Ellerman Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sukadev Bhattiprolu Cc: Thomas Gleixner Cc: linuxppc-dev@lists.ozlabs.org Link: http://lore.kernel.org/lkml/20200401203340.31402-6-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/expr.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/perf/tests/expr.c b/tools/perf/tests/expr.c index 516504c..f9e8e56 100644 --- a/tools/perf/tests/expr.c +++ b/tools/perf/tests/expr.c @@ -59,6 +59,14 @@ int test__expr(struct test *t __maybe_unused, int subtest __maybe_unused) TEST_ASSERT_VAL("find other", !strcmp(other[2], "BOZO")); TEST_ASSERT_VAL("find other", other[3] == NULL); + TEST_ASSERT_VAL("find other", + expr__find_other("EVENT1\\,param\\=?@ + EVENT2\\,param\\=?@", NULL, + &other, &num_other, 3) == 0); + TEST_ASSERT_VAL("find other", num_other == 2); + TEST_ASSERT_VAL("find other", !strcmp(other[0], "EVENT1,param=3/")); + TEST_ASSERT_VAL("find other", !strcmp(other[1], "EVENT2,param=3/")); + TEST_ASSERT_VAL("find other", other[2] == NULL); + for (i = 0; i < num_other; i++) zfree(&other[i]); free((void *)other);