Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp5087603rdb; Sat, 16 Sep 2023 02:19:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOiXeM5s6KMMoJFweQUrqUyV358DzYqnmZQ5nc3gKQEQMeHYqJ2DA+7xp2Jt3gVmepYgwT X-Received: by 2002:a05:6a20:6a20:b0:148:658a:a73d with SMTP id p32-20020a056a206a2000b00148658aa73dmr4411475pzk.5.1694855972895; Sat, 16 Sep 2023 02:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694855972; cv=none; d=google.com; s=arc-20160816; b=t6vCnWmrKEJ4DEUiCamP6W8KF49bBsoYAXY17CtQwhWyVQ+fG3Blq2HeGWi3vDxw/r pPJIRJKfjbuE5Td2U1UZBZU3ow5uyZ531N7L5KKmzhNrPLe4K15MOU7Mcc0D2aYWOPtK LJlJedhyM3q7uRdPPN4P5cD19IcwmvZVBznUQfMS7MZSJhkWdHqUaDbCpOuq6WB78DQ/ pkXcuHbMEesjXzZcXMcemRVKy1W5+VHnv0rEdZKR1LEfKkJn96IlymhLgHUiN/2OSxAG xN69eX1YM7GH5L/V35Rcu/dI0cuMaRuSjmHVCFY+Yh+17vYYN1/81EOwKK59ydPj2DAA FE3Q== 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 :message-id:date:subject:cc:to:from; bh=9YpIcBaQlBWQJEiVQMxJrjtD0CQYVw1xP31zDXX+jNk=; fh=JXx1mv1fB650HoTkc5GIgpDQ5Ey550GcDyaNZ/s6bYc=; b=EcvSjvNmtIPsWPr9Sm4/kVXAeJ87M20AspANrIUS+0D3YDu4fKGRpmZBXkO3toXLba eWr2YQa3FM4upwRUlins4xGTdDSJvDSABjsyLSf7g+Gcy9X83IgWPdIOdARvInYcfsyY 0A4ZmkTZa8mcQGJ3otwGNlZWYdkv5vVXgL3b8mCd60jimffNwGVlqxBClpwhb1GbPOMu 4RbH1CtjDhd3RJjBQyvM1fFRGPF0vhQCuBbdTetT5dctLjLv3mdgGnY7jQYre/yZNNOs svOZXtAmk0FQMHITWUzyNmyjgQPmMyYfc4snX69V9ia9qyM0N0YNhoT+u0D2oU9qd/tE BVmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id by7-20020a056a00400700b006903fc94799si3164616pfb.319.2023.09.16.02.19.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 02:19:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 35E3883CAA77; Sat, 16 Sep 2023 02:19:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238213AbjIPJS7 (ORCPT + 99 others); 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: 7BIT Content-Type: text/plain; charset=US-ASCII 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 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sat, 16 Sep 2023 02:19:30 -0700 (PDT) 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=/tmp/tmpm3s60aji ./perf record -o /tmp/tmpm3s60aji/perf.data --no-bpf-event -e dummy -C 0 kill >/dev/null 2>&1' ret '1', expected '1' expected read_format=4, 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=/tmp/tmppa9vxcb7 ./perf record -o /tmp/tmppa9vxcb7/perf.data --no-bpf-event -e dummy -C 0 kill >/dev/null 2>&1' ret '1', expected '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_6as915UsF25MoLbfjE350tAP43Bog@mail.gmail.com/ Signed-off-by: Yang Jihong --- 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=4000 # PERF_SAMPLE_PERIOD # + PERF_SAMPLE_CPU added by -C 0 sample_type=391 -read_format=4 +read_format=4|20 disabled=0 inherit=1 pinned=0 -- 2.34.1