Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1925720E7 for ; Wed, 28 Dec 2022 16:56:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85318C433EF; Wed, 28 Dec 2022 16:56:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1672246576; bh=vWvS77y3aOqKyCHgi+CB3rdVEMh/eS0ZGnwOuYNBRR4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tqUo9KCJn5B1clKHyYJ3ZlbFL231O6vPvRl+NdTb7djG3xcQRb3jVSsVQPEXy4UWr U0Arazxw7CM/ufj6jGwsNeZTIx31Z3vsIYjF4e3zfa1xqKh3QaQK7X8wtsGVWhQA8M +3yGFSaIjxehTbc+xHBImo56q6zWOvDaX10fJZ30= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Michael Petlan , Athira Rajeev , Disha Goel , Ian Rogers , Michael Ellerman , Nageswara R Sastry , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 6.1 1087/1146] perf test: Fix "all PMU test" to skip parametrized events Date: Wed, 28 Dec 2022 15:43:46 +0100 Message-Id: <20221228144359.718716577@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221228144330.180012208@linuxfoundation.org> References: <20221228144330.180012208@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Michael Petlan [ Upstream commit b50d691e50e600fab82b423be871860537d75dc9 ] Parametrized events are not only a powerpc domain. They occur on other platforms too (e.g. aarch64). They should be ignored in this testcase, since proper setup of the parameters is out of scope of this script. Let's not filter them out by PMU name, but rather based on the fact that they expect a parameter. Fixes: 451ed8058c69a3fe ("perf test: Fix "all PMU test" to skip hv_24x7/hv_gpci tests on powerpc") Signed-off-by: Michael Petlan Cc: Athira Rajeev Cc: Disha Goel Cc: Ian Rogers Cc: Michael Ellerman Cc: Nageswara R Sastry Link: https://lore.kernel.org/r/20221219163008.9691-1-mpetlan@redhat.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/tests/shell/stat_all_pmu.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tools/perf/tests/shell/stat_all_pmu.sh b/tools/perf/tests/shell/stat_all_pmu.sh index 9c9ef33e0b3c..c77955419173 100755 --- a/tools/perf/tests/shell/stat_all_pmu.sh +++ b/tools/perf/tests/shell/stat_all_pmu.sh @@ -4,17 +4,8 @@ set -e -for p in $(perf list --raw-dump pmu); do - # In powerpc, skip the events for hv_24x7 and hv_gpci. - # These events needs input values to be filled in for - # core, chip, partition id based on system. - # Example: hv_24x7/CPM_ADJUNCT_INST,domain=?,core=?/ - # hv_gpci/event,partition_id=?/ - # Hence skip these events for ppc. - if echo "$p" |grep -Eq 'hv_24x7|hv_gpci' ; then - echo "Skipping: Event '$p' in powerpc" - continue - fi +# Test all PMU events; however exclude parametrized ones (name contains '?') +for p in $(perf list --raw-dump pmu | sed 's/[[:graph:]]\+?[[:graph:]]\+[[:space:]]//g'); do echo "Testing $p" result=$(perf stat -e "$p" true 2>&1) if ! echo "$result" | grep -q "$p" && ! echo "$result" | grep -q "" ; then -- 2.35.1