perf: fix perf tests to support generic compat pmu #2913
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
perf_c2c, perf_mem tests give error incase perf mem command fails when events are not available. Fix it by adding ignore_status check so test cancels.
Added event raw codes for generic compat pmu for perf_genericevents test.
perf_json test results in false positive when pmu events are not present in case of generic compat pmu. Modify the code to cancel when events are not present. Also moved kernel building part after perf list check to avoid kernel build when not required.
Modified perf_pmu:test_cpu_event_count by removing hardcoded number, instead just check for presence of events.
perf_pmu:test_caps_feat fails on older distros where caps file is not present. Modified the code to check for caps file presence instead of checking for P10/P11.
Add a check to find pmu events presence before running perf_rawevents test.