* [PATCH] perf test: Fix test-record-dummy-C0 failure for supported PERF_FORMAT_LOST feature kernel
@ 2023-09-16 9:16 Yang Jihong
2023-09-17 5:36 ` Namhyung Kim
0 siblings, 1 reply; 3+ messages in thread
From: Yang Jihong @ 2023-09-16 9:16 UTC (permalink / raw)
To: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
namhyung, irogers, adrian.hunter, linux-perf-users, linux-kernel
Cc: yangjihong1
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(-)
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf test: Fix test-record-dummy-C0 failure for supported PERF_FORMAT_LOST feature kernel
2023-09-16 9:16 [PATCH] perf test: Fix test-record-dummy-C0 failure for supported PERF_FORMAT_LOST feature kernel Yang Jihong
@ 2023-09-17 5:36 ` Namhyung Kim
2023-09-18 22:37 ` Namhyung Kim
0 siblings, 1 reply; 3+ messages in thread
From: Namhyung Kim @ 2023-09-17 5:36 UTC (permalink / raw)
To: Yang Jihong
Cc: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
irogers, adrian.hunter, linux-perf-users, linux-kernel
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf test: Fix test-record-dummy-C0 failure for supported PERF_FORMAT_LOST feature kernel
2023-09-17 5:36 ` Namhyung Kim
@ 2023-09-18 22:37 ` Namhyung Kim
0 siblings, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2023-09-18 22:37 UTC (permalink / raw)
To: Yang Jihong
Cc: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
irogers, adrian.hunter, linux-perf-users, linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-18 22:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-16 9:16 [PATCH] perf test: Fix test-record-dummy-C0 failure for supported PERF_FORMAT_LOST feature kernel Yang Jihong
2023-09-17 5:36 ` Namhyung Kim
2023-09-18 22:37 ` Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).