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 <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
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;