Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9090995pxu; Mon, 28 Dec 2020 06:25:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6EA0tvf+oZEFsm5d1S5Xd/vUlZqM9n7ZK09JX6hJji3jcdxLtb3Dnldv182/6o6vKxAUF X-Received: by 2002:a05:6402:30ac:: with SMTP id df12mr43968893edb.175.1609165505341; Mon, 28 Dec 2020 06:25:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165505; cv=none; d=google.com; s=arc-20160816; b=YExZX2qbbgLICVMCpUavTx0QD4rGZ0TCnovTq+8eZElKXSOZkKWWoO28AgTd2QNER7 tz2PlVJyI68TSc4SQIqi8RHSE3soJ9R7H43fm6ywi7+bdxoDb8ORTr2ZgGleFzF80spo SPc2nOiUuOPeDZRLwZHJx7uSwqdTYcYtMv41xkyQPZOB9NjmQ1+1v8hg+8KSBfPMYINW 1U1FwCQWzgMKGoHJ6FNHe/Yj7XGovT68DnddjwFwJHKJwnpP4rIw9gvoZuVHH1CfjlWR a9Og0Gxhid4tPbPEJ6pRtVARAZki8WGLWPhwJqACABk85i++dS+B8RF2u3WK5P4m6JeY JD5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=woEcm5wiB2Qmm3rZyAAxUUuM2o5gd/iwB+mus+TmnqE=; b=0SIjkLtGWBctRHGaYtNvmKZxTtfi5sHisPBX4ktADyunm220EuQpM8U9IurVx9yZk0 H7YUU+kmxyHG/IYBdu4jpaJO8Hfu80TvR1b4dTwhaCeE56fX314KduGDOCo4lH+c+YBx I1YnO3bgj1wJqYK9b64kc/wndMyBJoALN+qQ6RIbmy7wp5FVHmDd0LzkTwKwsY+ELz9N rgySZ5o3FYQikKl+OSS/ljvkMvObgwQfknvAb0xeE8F71RnNjwL3xs7CCITG2a6XLjPx z4QY4JhPagisWTCrCaBwVw3SHB0Wek/gPrXo9dPbWSBcrE02MAIqSjnajgvwZuO5DRCV Y8+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iUx9wbQf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si20702969edp.7.2020.12.28.06.24.42; Mon, 28 Dec 2020 06:25:05 -0800 (PST) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iUx9wbQf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438064AbgL1OVu (ORCPT + 99 others); Mon, 28 Dec 2020 09:21:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:55632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502547AbgL1OVV (ORCPT ); Mon, 28 Dec 2020 09:21:21 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C2774206D4; Mon, 28 Dec 2020 14:21:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165266; bh=dmCA1ZTHiAWZ1xMo2G0cukPuVJeRhepqlpgejjsNbws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iUx9wbQfcnaLouHrOwi3aOYpZMrGn547WpK79XMfMbjQNtLurBpBgAeZ1Y12m10yA Ij3X1sDZpEISlAAX4fKZHSMi9WQtmObk+urCm4u00tQEz+3aYsXli1qsF8owjM/x7X H/E0Dee2afvSqq4koHJ/uMDNHp5f8K+cmv6I+SOs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kajol Jain , Ian Rogers , Jiri Olsa , Madhavan Srinivasan , Ravi Bangoria , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 5.10 444/717] perf test: Fix metric parsing test Date: Mon, 28 Dec 2020 13:47:22 +0100 Message-Id: <20201228125042.243540131@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kajol Jain [ Upstream commit b2ce5dbc15819ea4bef47dbd368239cb1e965158 ] Commit e1c92a7fbbc5 ("perf tests: Add another metric parsing test") add another test for metric parsing. The test goes through all metrics compiled for arch within pmu events and try to parse them. Right now this test is failing in powerpc machine. Result in power9 platform: [command]# ./perf test 10 10: PMU events : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Skip (some metrics failed) 10.4: Parsing of PMU event table metrics with fake PMUs : FAILED! Issue is we are passing different runtime parameter value in "expr__find_other" and "expr__parse" function which is called from function `metric_parse_fake`. And because of this parsing of hv-24x7 metrics is failing. [command]# ./perf test 10 -vv ..... hv_24x7/pm_mcs01_128b_rd_disp_port01,chip=1/ not found expr__parse failed test child finished with -1 ---- end ---- PMU events subtest 4: FAILED! This patch fix this issue and change runtime parameter value to '0' in expr__parse function. Result in power9 platform after this patch: [command]# ./perf test 10 10: PMU events : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Skip (some metrics failed) 10.4: Parsing of PMU event table metrics with fake PMUs : Ok Fixes: e1c92a7fbbc5 ("perf tests: Add another metric parsing test") Signed-off-by: Kajol Jain Acked-by: Ian Rogers Acked-by: Jiri Olsa Cc: Madhavan Srinivasan Cc: Ravi Bangoria Link: http://lore.kernel.org/lkml/20201119152411.46041-1-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/tests/pmu-events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/pmu-events.c b/tools/perf/tests/pmu-events.c index d3517a74d95e3..31f987bb7ebba 100644 --- a/tools/perf/tests/pmu-events.c +++ b/tools/perf/tests/pmu-events.c @@ -561,7 +561,7 @@ static int metric_parse_fake(const char *str) } } - if (expr__parse(&result, &ctx, str, 1)) + if (expr__parse(&result, &ctx, str, 0)) pr_err("expr__parse failed\n"); else ret = 0; -- 2.27.0