Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp2671376rwb; Mon, 7 Aug 2023 01:10:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG27Hms7rLoRkVEnb0/WKqeFd5tYIaRf0whOfb5K4qMegfSeLE0ISPGxQaIU21rlnnmZkdU X-Received: by 2002:a05:6a20:a11a:b0:13e:b58a:e3e8 with SMTP id q26-20020a056a20a11a00b0013eb58ae3e8mr8542168pzk.50.1691395852871; Mon, 07 Aug 2023 01:10:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691395852; cv=none; d=google.com; s=arc-20160816; b=IxZGbU8MEWxsLCShU6VyJGOyztU8IzBxtE4IHv0Al8gdcRm5oXTEDMVKJpKmqnsiXN FU8+DxJ65RJq4FvcC/Hqsh3+UcB/fUG50l+RWhH95giVN8uALIbv+cgd++gmWFnJ21fq 15lHu4XvTfuriDeKN6F8dqxYRSoYGUA/He09vBVvmobpy0LpAw+bLSy5A6iGs0YFbaMv nH4ze3gp4rQ+ZRqPrbHhNba7WgRxsfLysdoWXGJrZYIRz3Aou9f63AEXjBDc8EPsjT22 XBm03FPlqy5Cyz75ywnQmS4RXowfAIWJDIRiuz7Q28FM5/u3YxYJtk6yRG398sZLSkFY /EBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=1296gezpjKBmKw73qVgvXlPEJC5OWjPr6pk8oUulWXQ=; fh=7pF9AUGuuVLtftwWy2EJKaooMcBit4LAHr6bHM40jlQ=; b=vll9CM7MXPAuwtzxSO2av1JtCZasr8om5lhWxwjnmN2ChmKOFxO38EYPGkTKkXw0pl wn3L61lVhtxaggtj3gZSn6Az6g0X5GbZh6sIt7LRBUhIFpRwPQ/HJyW794UsCJ+0RAzV mC7pM2VCkF/oy6h8xMU0Z2VYbrAtJh7b2h0J11hAaNkTein9pMEz+29ECi3zoHgeyiFd cUeyXnw6Yfn3KUcnWshc/28o5/VdBBsgXkD7VoU5b0st5gGXebwHwqxPEZCcCe+YJ3io Sp7ZwLu6c7qTphLd7TBPSJJDfTARZrAbD6IM6THNlPgEifuvUJyTmV/QNZ2Mu/uzRmnK 0Pyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z17-20020a631911000000b0053f01212571si5299640pgl.257.2023.08.07.01.10.40; Mon, 07 Aug 2023 01:10:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229646AbjHGHwW (ORCPT + 99 others); Mon, 7 Aug 2023 03:52:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231225AbjHGHvr (ORCPT ); Mon, 7 Aug 2023 03:51:47 -0400 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FE4A1703; Mon, 7 Aug 2023 00:51:43 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R751e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0VpC-04Z_1691394697; Received: from srmbuffer011165236051.sqa.net(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VpC-04Z_1691394697) by smtp.aliyun-inc.com; Mon, 07 Aug 2023 15:51:38 +0800 From: Jing Zhang To: John Garry , Ian Rogers Cc: Will Deacon , James Clark , Arnaldo Carvalho de Melo , Mark Rutland , Mike Leach , Leo Yan , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Adrian Hunter , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-doc@vger.kernel.org, Zhuo Song , Jing Zhang , Shuai Xue Subject: [PATCH v6 4/7] perf test: Fix matching_pmu Date: Mon, 7 Aug 2023 15:51:22 +0800 Message-Id: <1691394685-61240-5-git-send-email-renyu.zj@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1691394685-61240-1-git-send-email-renyu.zj@linux.alibaba.com> References: <1691394685-61240-1-git-send-email-renyu.zj@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The perf_pmu_test_event.matching_pmu didn't work. No matter what its value is, it does not affect the test results. So let matching_pmu be used for matching perf_pmu_test_pmu.pmu.name. Fixes: 5a65c0c8f6fd ("perf test: Re-add pmu-event uncore PMU alias test") Signed-off-by: Jing Zhang --- tools/perf/tests/pmu-events.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/perf/tests/pmu-events.c b/tools/perf/tests/pmu-events.c index 1dff863b..3204252 100644 --- a/tools/perf/tests/pmu-events.c +++ b/tools/perf/tests/pmu-events.c @@ -238,7 +238,7 @@ struct perf_pmu_test_pmu { }, .alias_str = "event=0x2b", .alias_long_desc = "ddr write-cycles event. Unit: uncore_sys_ddr_pmu ", - .matching_pmu = "uncore_sys_ddr_pmu", + .matching_pmu = "uncore_sys_ddr_pmu0", }; static const struct perf_pmu_test_event sys_ccn_pmu_read_cycles = { @@ -252,7 +252,7 @@ struct perf_pmu_test_pmu { }, .alias_str = "config=0x2c", .alias_long_desc = "ccn read-cycles event. Unit: uncore_sys_ccn_pmu ", - .matching_pmu = "uncore_sys_ccn_pmu", + .matching_pmu = "uncore_sys_ccn_pmu4", }; static const struct perf_pmu_test_event *sys_events[] = { @@ -599,6 +599,11 @@ static int __test_uncore_pmu_event_aliases(struct perf_pmu_test_pmu *test_pmu) struct pmu_event const *event = &test_event->event; if (!strcmp(event->name, alias->name)) { + if (strcmp(pmu_name, test_event->matching_pmu)) { + pr_debug("testing aliases uncore PMU %s: mismatched matching_pmu, %s vs %s\n", + pmu_name, test_event->matching_pmu, pmu_name); + continue; + } if (compare_alias_to_test_event(alias, test_event, pmu_name)) { -- 1.8.3.1