From nobody Mon Apr 6 11:51:42 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 519E9C433FE for ; Wed, 12 Oct 2022 09:47:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230045AbiJLJrS (ORCPT ); Wed, 12 Oct 2022 05:47:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229921AbiJLJrK (ORCPT ); Wed, 12 Oct 2022 05:47:10 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B71ADB0B32; Wed, 12 Oct 2022 02:47:06 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 096CF1684; Wed, 12 Oct 2022 02:47:12 -0700 (PDT) Received: from e121896.Emea.Arm.com (e121896.Emea.Arm.com [10.32.36.24]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 24EC53F792; Wed, 12 Oct 2022 02:47:02 -0700 (PDT) From: James Clark To: linux-perf-users@vger.kernel.org, acme@kernel.org, namhyung@kernel.org Cc: linux-kernel@vger.kernel.org, James Clark , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter Subject: [PATCH v2 1/1] perf test: Fix attr tests for PERF_FORMAT_LOST Date: Wed, 12 Oct 2022 10:46:32 +0100 Message-Id: <20221012094633.21669-2-james.clark@arm.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20221012094633.21669-1-james.clark@arm.com> References: <20221012094633.21669-1-james.clark@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Since PERF_FORMAT_LOST was added, the default read format has that bit set, so add it to the tests. Keep the old value as well so that the test still passes on older kernels. This fixes the following failure: expected read_format=3D0|4, got 20 FAILED './tests/attr/test-record-C0' - match failure Fixes: 85b425f31c88 ("perf record: Set PERF_FORMAT_LOST by default") Cc: Namhyung Kim Signed-off-by: James Clark Acked-by: Namhyung Kim --- tools/perf/tests/attr/base-record | 2 +- tools/perf/tests/attr/system-wide-dummy | 2 +- tools/perf/tests/attr/test-record-group | 4 ++-- tools/perf/tests/attr/test-record-group-sampling | 6 +++--- tools/perf/tests/attr/test-record-group1 | 4 ++-- tools/perf/tests/attr/test-record-group2 | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/perf/tests/attr/base-record b/tools/perf/tests/attr/base= -record index 8c10955eff93..3ef07a12aa14 100644 --- a/tools/perf/tests/attr/base-record +++ b/tools/perf/tests/attr/base-record @@ -9,7 +9,7 @@ size=3D128 config=3D0 sample_period=3D* sample_type=3D263 -read_format=3D0|4 +read_format=3D0|4|20 disabled=3D1 inherit=3D1 pinned=3D0 diff --git a/tools/perf/tests/attr/system-wide-dummy b/tools/perf/tests/att= r/system-wide-dummy index 86a15dd359d9..8fec06eda5f9 100644 --- a/tools/perf/tests/attr/system-wide-dummy +++ b/tools/perf/tests/attr/system-wide-dummy @@ -11,7 +11,7 @@ size=3D128 config=3D9 sample_period=3D4000 sample_type=3D455 -read_format=3D4 +read_format=3D4|20 # Event will be enabled right away. disabled=3D0 inherit=3D1 diff --git a/tools/perf/tests/attr/test-record-group b/tools/perf/tests/att= r/test-record-group index 14ee60fd3f41..6c1cff8aae8b 100644 --- a/tools/perf/tests/attr/test-record-group +++ b/tools/perf/tests/attr/test-record-group @@ -7,14 +7,14 @@ ret =3D 1 fd=3D1 group_fd=3D-1 sample_type=3D327 -read_format=3D4 +read_format=3D4|20 =20 [event-2:base-record] fd=3D2 group_fd=3D1 config=3D1 sample_type=3D327 -read_format=3D4 +read_format=3D4|20 mmap=3D0 comm=3D0 task=3D0 diff --git a/tools/perf/tests/attr/test-record-group-sampling b/tools/perf/= tests/attr/test-record-group-sampling index 300b9f7e6d69..97e7e64a38f0 100644 --- a/tools/perf/tests/attr/test-record-group-sampling +++ b/tools/perf/tests/attr/test-record-group-sampling @@ -7,7 +7,7 @@ ret =3D 1 fd=3D1 group_fd=3D-1 sample_type=3D343 -read_format=3D12 +read_format=3D12|28 inherit=3D0 =20 [event-2:base-record] @@ -21,8 +21,8 @@ config=3D3 # default | PERF_SAMPLE_READ sample_type=3D343 =20 -# PERF_FORMAT_ID | PERF_FORMAT_GROUP -read_format=3D12 +# PERF_FORMAT_ID | PERF_FORMAT_GROUP | PERF_FORMAT_LOST +read_format=3D12|28 task=3D0 mmap=3D0 comm=3D0 diff --git a/tools/perf/tests/attr/test-record-group1 b/tools/perf/tests/at= tr/test-record-group1 index 3ffe246e0228..eeb1db392bc9 100644 --- a/tools/perf/tests/attr/test-record-group1 +++ b/tools/perf/tests/attr/test-record-group1 @@ -7,7 +7,7 @@ ret =3D 1 fd=3D1 group_fd=3D-1 sample_type=3D327 -read_format=3D4 +read_format=3D4|20 =20 [event-2:base-record] fd=3D2 @@ -15,7 +15,7 @@ group_fd=3D1 type=3D0 config=3D1 sample_type=3D327 -read_format=3D4 +read_format=3D4|20 mmap=3D0 comm=3D0 task=3D0 diff --git a/tools/perf/tests/attr/test-record-group2 b/tools/perf/tests/at= tr/test-record-group2 index 6b9f8d182ce1..cebdaa8e64e4 100644 --- a/tools/perf/tests/attr/test-record-group2 +++ b/tools/perf/tests/attr/test-record-group2 @@ -9,7 +9,7 @@ group_fd=3D-1 config=3D0|1 sample_period=3D1234000 sample_type=3D87 -read_format=3D12 +read_format=3D12|28 inherit=3D0 freq=3D0 =20 @@ -19,7 +19,7 @@ group_fd=3D1 config=3D0|1 sample_period=3D6789000 sample_type=3D87 -read_format=3D12 +read_format=3D12|28 disabled=3D0 inherit=3D0 mmap=3D0 --=20 2.28.0