From nobody Thu Feb 12 09:32:49 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 955B0C46CA1 for ; Sat, 16 Sep 2023 09:19:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238327AbjIPJS7 (ORCPT ); Sat, 16 Sep 2023 05:18:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232127AbjIPJS2 (ORCPT ); Sat, 16 Sep 2023 05:18:28 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E092173C; Sat, 16 Sep 2023 02:18:17 -0700 (PDT) Received: from kwepemm600003.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RnljX4Rj2ztS5B; Sat, 16 Sep 2023 17:13:52 +0800 (CST) Received: from ubuntu2204.huawei.com (10.67.174.22) by kwepemm600003.china.huawei.com (7.193.23.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Sat, 16 Sep 2023 17:18:02 +0800 From: Yang Jihong To: , , , , , , , , , , CC: Subject: [PATCH] perf test: Fix test-record-dummy-C0 failure for supported PERF_FORMAT_LOST feature kernel Date: Sat, 16 Sep 2023 09:16:41 +0000 Message-ID: <20230916091641.776031-1-yangjihong1@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.67.174.22] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600003.china.huawei.com (7.193.23.202) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" For kernel that supports PERF_FORMAT_LOST, attr->read_format has PERF_FORMAT_LOST bit. Update expected value of attr->read_format of test-record-dummy-C0 for this scenario. Before: # ./perf test 17 -vv 17: Setup struct perf_event_attr : --- start --- test child forked, pid 1609441 running './tests/attr/test-record-dummy-C0' 'PERF_TEST_ATTR=3D/tmp/tmpm3s60aji ./perf record -o /tmp/tmpm3s60aji/pe= rf.data --no-bpf-event -e dummy -C 0 kill >/dev/null 2>&1' ret '1', expecte= d '1' expected read_format=3D4, got 20 FAILED './tests/attr/test-record-dummy-C0' - match failure test child finished with -1 ---- end ---- Setup struct perf_event_attr: FAILED! After: # ./perf test 17 -vv 17: Setup struct perf_event_attr : --- start --- test child forked, pid 1609441 running './tests/attr/test-record-dummy-C0' 'PERF_TEST_ATTR=3D/tmp/tmppa9vxcb7 ./perf record -o /tmp/tmppa9vxcb7/pe= rf.data --no-bpf-event -e dummy -C 0 kill >/dev/null 2>&1' ret '1', expecte= d '1' test child finished with 0 ---- end ---- Setup struct perf_event_attr: Ok Reported-by: Namhyung Kim Closes: https://lore.kernel.org/all/CAM9d7cgNH2+zhSAmA3en_6as915UsF25MoLbfj= E350tAP43Bog@mail.gmail.com/ Signed-off-by: Yang Jihong Tested-by: Namhyung Kim --- tools/perf/tests/attr/test-record-dummy-C0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/attr/test-record-dummy-C0 b/tools/perf/tests/= attr/test-record-dummy-C0 index 83ca4e373acd..576ec48b3aaf 100644 --- a/tools/perf/tests/attr/test-record-dummy-C0 +++ b/tools/perf/tests/attr/test-record-dummy-C0 @@ -17,7 +17,7 @@ sample_period=3D4000 # PERF_SAMPLE_PERIOD # + PERF_SAMPLE_CPU added by -C 0 sample_type=3D391 -read_format=3D4 +read_format=3D4|20 disabled=3D0 inherit=3D1 pinned=3D0 --=20 2.34.1