* [PATCH] tools/perf/tests: Remove duplicate evlist__delete in tests/tool_pmu.c
@ 2024-10-13 17:07 Athira Rajeev
2024-10-14 17:43 ` Namhyung Kim
0 siblings, 1 reply; 3+ messages in thread
From: Athira Rajeev @ 2024-10-13 17:07 UTC (permalink / raw)
To: acme, jolsa, adrian.hunter, irogers, namhyung
Cc: linux-kernel, linux-perf-users, linuxppc-dev, akanksha, maddy,
atrajeev, kjain, disgoel, hbathini
The testcase for tool_pmu failed in powerpc as below:
./perf test -v "Parsing without PMU name"
8: Tool PMU :
8.1: Parsing without PMU name : FAILED!
This happens when parse_events results in either skip or fail
of an event. Because the code invokes evlist__delete(evlist)
and "goto out".
ret = parse_events(evlist, str, &err);
if (ret) {
evlist__delete(evlist);
But in the "out" section also evlist__delete happens.
out:
evlist__delete(evlist);
return ret;
Hence remove the duplicate evlist__delete from the first path
in the testcase
With the change:
# ./perf test -v "Parsing without PMU name"
8: Tool PMU :
8.1: Parsing without PMU name : Ok
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
---
tools/perf/tests/tool_pmu.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/perf/tests/tool_pmu.c b/tools/perf/tests/tool_pmu.c
index 94d0dd8fd3cb..618223654992 100644
--- a/tools/perf/tests/tool_pmu.c
+++ b/tools/perf/tests/tool_pmu.c
@@ -27,7 +27,6 @@ static int do_test(enum tool_pmu_event ev, bool with_pmu)
parse_events_error__init(&err);
ret = parse_events(evlist, str, &err);
if (ret) {
- evlist__delete(evlist);
if (tool_pmu__skip_event(tool_pmu__event_to_str(ev))) {
ret = TEST_OK;
goto out;
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/perf/tests: Remove duplicate evlist__delete in tests/tool_pmu.c
2024-10-13 17:07 [PATCH] tools/perf/tests: Remove duplicate evlist__delete in tests/tool_pmu.c Athira Rajeev
@ 2024-10-14 17:43 ` Namhyung Kim
2024-10-16 12:30 ` Athira Rajeev
0 siblings, 1 reply; 3+ messages in thread
From: Namhyung Kim @ 2024-10-14 17:43 UTC (permalink / raw)
To: acme, jolsa, adrian.hunter, irogers, Athira Rajeev
Cc: linux-kernel, linux-perf-users, linuxppc-dev, akanksha, maddy,
kjain, disgoel, hbathini
On Sun, 13 Oct 2024 22:37:32 +0530, Athira Rajeev wrote:
> The testcase for tool_pmu failed in powerpc as below:
>
> ./perf test -v "Parsing without PMU name"
> 8: Tool PMU :
> 8.1: Parsing without PMU name : FAILED!
>
> This happens when parse_events results in either skip or fail
> of an event. Because the code invokes evlist__delete(evlist)
> and "goto out".
>
> [...]
Applied to perf-tools-next, thanks!
Best regards,
Namhyung
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/perf/tests: Remove duplicate evlist__delete in tests/tool_pmu.c
2024-10-14 17:43 ` Namhyung Kim
@ 2024-10-16 12:30 ` Athira Rajeev
0 siblings, 0 replies; 3+ messages in thread
From: Athira Rajeev @ 2024-10-16 12:30 UTC (permalink / raw)
To: Namhyung Kim
Cc: acme, jolsa, adrian.hunter, irogers, linux-kernel,
linux-perf-users, linuxppc-dev, akanksha, maddy, kjain, disgoel,
hbathini
> On 14 Oct 2024, at 11:13 PM, Namhyung Kim <namhyung@kernel.org> wrote:
>
> On Sun, 13 Oct 2024 22:37:32 +0530, Athira Rajeev wrote:
>
>> The testcase for tool_pmu failed in powerpc as below:
>>
>> ./perf test -v "Parsing without PMU name"
>> 8: Tool PMU :
>> 8.1: Parsing without PMU name : FAILED!
>>
>> This happens when parse_events results in either skip or fail
>> of an event. Because the code invokes evlist__delete(evlist)
>> and "goto out".
>>
>> [...]
>
> Applied to perf-tools-next, thanks!
Thanks Namhyung for picking the change
Athira
>
> Best regards,
> Namhyung
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-16 12:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-13 17:07 [PATCH] tools/perf/tests: Remove duplicate evlist__delete in tests/tool_pmu.c Athira Rajeev
2024-10-14 17:43 ` Namhyung Kim
2024-10-16 12:30 ` Athira Rajeev
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).