perf test: Fix test-record-dummy-C0 failure for supported PERF_FORMAT_LOST feature kernel
Message ID | 20230916091641.776031-1-yangjihong1@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1563252vqi; Sat, 16 Sep 2023 02:19:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IElGIJ0yx9sWpGFxEshrLAgdfVJFsuUKPoI/hoJHwNjlDBRTCDWSF8JQwgvGFDFWZNjIBMH X-Received: by 2002:a05:6358:9143:b0:142:fba8:dcfe with SMTP id r3-20020a056358914300b00142fba8dcfemr4966476rwr.16.1694855972359; 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=UsfDxugLSz6T3540ogrCmhKNGbLkGrZfXswMwapxIe+nwLFPWpfP63qjVOr9aWsCl6 QJ0MdqugMXvbAJ4AOh/c4NpzyNlq+lmOYvoDcClJXnI9sgCye3cp41gswIGnClT24B0r upuaWKAbpR6xqPxkuVNXwYHgjXlJPbUDUGhAjeECu77lXzdeVwJYnBoMs2ynfNwwpsPR u6ClIPsYvlL2efAJGEOHfi7lNbqv1pjJGHwenlgT1GVVXyaQ81Us0qFGJfvwOFGCilOn 24nfOLCkO3WZ288dTmWqr2ihbpZ3H2OnyR/2QudGD/msV1A3KSQ7xM4ZWFjo+A0lLz+q MKtA== 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 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id j184-20020a6380c1000000b00574134c9ac4si4571789pgd.524.2023.09.16.02.19.31 (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 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 1963C807D9A8; Sat, 16 Sep 2023 02:19:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238215AbjIPJS7 (ORCPT <rfc822;toshivichauhan@gmail.com> + 27 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <yangjihong1@huawei.com> To: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>, <mark.rutland@arm.com>, <alexander.shishkin@linux.intel.com>, <jolsa@kernel.org>, <namhyung@kernel.org>, <irogers@google.com>, <adrian.hunter@intel.com>, <linux-perf-users@vger.kernel.org>, <linux-kernel@vger.kernel.org> CC: <yangjihong1@huawei.com> 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 lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sat, 16 Sep 2023 02:19:30 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777185295824142001 X-GMAIL-MSGID: 1777185295824142001 |
Series |
perf test: Fix test-record-dummy-C0 failure for supported PERF_FORMAT_LOST feature kernel
|
|
Commit Message
Yang Jihong
Sept. 16, 2023, 9:16 a.m. UTC
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
<SNIP>
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
<SNIP>
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'
<SNIP>
test child finished with 0
---- end ----
Setup struct perf_event_attr: Ok
Reported-by: Namhyung Kim <namhyung@kernel.org>
Closes: https://lore.kernel.org/all/CAM9d7cgNH2+zhSAmA3en_6as915UsF25MoLbfjE350tAP43Bog@mail.gmail.com/
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
---
tools/perf/tests/attr/test-record-dummy-C0 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Sat, Sep 16, 2023 at 2:18 AM Yang Jihong <yangjihong1@huawei.com> wrote: > > 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 > <SNIP> > 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 > <SNIP> > 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' > <SNIP> > test child finished with 0 > ---- end ---- > Setup struct perf_event_attr: Ok > > Reported-by: Namhyung Kim <namhyung@kernel.org> > Closes: https://lore.kernel.org/all/CAM9d7cgNH2+zhSAmA3en_6as915UsF25MoLbfjE350tAP43Bog@mail.gmail.com/ I'll change it to follow the existing style like Fixes: d50ad02cb39a ("perf test: Add perf_event_attr test for record dummy event") > Signed-off-by: Yang Jihong <yangjihong1@huawei.com> Tested-by: Namhyung Kim <namhyung@kernel.org> Thanks, Namhyung > --- > 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 >
On Sat, Sep 16, 2023 at 10:36 PM Namhyung Kim <namhyung@kernel.org> wrote: > > On Sat, Sep 16, 2023 at 2:18 AM Yang Jihong <yangjihong1@huawei.com> wrote: > > > > 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 > > <SNIP> > > 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 > > <SNIP> > > 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' > > <SNIP> > > test child finished with 0 > > ---- end ---- > > Setup struct perf_event_attr: Ok > > > > Reported-by: Namhyung Kim <namhyung@kernel.org> > > Closes: https://lore.kernel.org/all/CAM9d7cgNH2+zhSAmA3en_6as915UsF25MoLbfjE350tAP43Bog@mail.gmail.com/ > > I'll change it to follow the existing style like > > Fixes: d50ad02cb39a ("perf test: Add perf_event_attr test for record > dummy event") > > > Signed-off-by: Yang Jihong <yangjihong1@huawei.com> > > Tested-by: Namhyung Kim <namhyung@kernel.org> Applied to perf-tools-next, thanks! Namhyung
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