Start aligning perf test with kunit style
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest22 patches 8 repliesIn review
- v222 patches 10 repliesSuperseded
- v1 RFC5 patches 10 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/22 | perf test: Use macro for "suite" declarationstools/ | +77 | 0 replies | |
| 2/22 | perf test: Use macro for "suite" definitionstools/ | +149 | 0 replies | |
| 3/22 | perf test: Make each test/suite its own struct.tools/ tools/ tools/ +8 more | +215 | 2 replies | |
| 4/22 | perf test: Move each test suite struct to its testtools/ tools/ tools/ +67 more | +397 | 0 replies | |
| 5/22 | perf test: Rename struct test to test_suitetools/ tools/ tools/ +78 more | +125 | 0 replies | |
| 6/22 | perf test: Add helper functions for abstraction.tools/ tools/ | +71 | 0 replies | |
| 7/22 | perf test: Add test case struct.tools/ tools/ | +46 | 0 replies | |
| 8/22 | perf test: Add skip reason to test case.tools/ tools/ | +13 | 0 replies | |
| 9/22 | perf test: Convert pfm tests to use test cases.tools/ | +19 | 0 replies | |
| 10/22 | perf test: Convert pmu event tests to test cases.tools/ | +16 | 0 replies | |
| 11/22 | perf test: Convert watch point tests to test cases.tools/ | +30 | 0 replies | |
| 12/22 | perf test: Convert clang tests to test cases.tools/ tools/ tools/ | +24 | 0 replies | |
| 13/22 | perf test: Convert bpf tests to test cases.tools/ | +43 | 0 replies | |
| 14/22 | perf test: Convert llvm tests to test cases.tools/ | +54 | 0 replies | |
| 15/22 | perf test: Remove now unused subtest helperstools/ tools/ | +1 | 0 replies | |
| 16/22 | perf test: bp tests use test casetools/ tools/ tools/ | +18 | 0 replies | |
| 17/22 | perf test: Convert time to tsc test to test case.tools/ | +6 | 0 replies | |
| 18/22 | perf test: Remove non test case style support.tools/ tools/ | +16 | 0 replies | |
| 19/22 | perf test: BP tests, remove is_supported usetools/ tools/ tools/ +1 more | +51 | 0 replies | |
| 20/22 | perf test: TSC test, remove is_supported usetools/ | +16 | 0 replies | |
| 21/22 | perf test: Remove is_supported functiontools/ tools/ | +1 | 0 replies | |
| 22/22 | perf test: Remove skip_if_failtools/ tools/ tools/ +3 more | +8 | 3 replies |
Reviews trailers per patch
None of the 22 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Sohaib Mohamed | Jiri Olsa |
|---|---|---|
| Series | T-b | A-b |
| 1/22 | ||
| 2/22 | ||
| 3/22 | ||
| 4/22 | ||
| 5/22 | ||
| 6/22 | ||
| 7/22 | ||
| 8/22 | ||
| 9/22 | ||
| 10/22 | ||
| 11/22 | ||
| 12/22 | ||
| 13/22 | ||
| 14/22 | ||
| 15/22 | ||
| 16/22 | ||
| 17/22 | ||
| 18/22 | ||
| 19/22 | ||
| 20/22 | ||
| 21/22 | ||
| 22/22 | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 00/22] Start aligning perf test with kunit style
Perf test uses its own structs and code layout that differs from kunit that was more recently introduced to the kernel. Besides consistency, it is hoped that moving in the direction of kunit style will enable reuse of infrastructure like test output formatting for continuous testing systems. For example:
https://lore.kernel.org/linux-kselftest/CA+GJov6tdjvY9x12JsJT14qn6c7NViJxqaJk+r-K1YJzPggFDQ@mail.gmail.com/
The motivation for this restructuring comes from wanting to be able to tag tests with a size:
https://lore.kernel.org/linux-perf-users/CAP-5=fWmGyuqFKc-EMP3rbmTkjZ3MS+YSajGZfeRMc38HS82gw@mail.gmail.com/
To have more exhaustive and slower running tests. This isn't something kunit currently supports, nor is the execution of python and shell tests, but it seems sensible to work on an approach with kunit rather to invent a new wheel inside of perf.
These initial patches are just refactoring the main test suite definitions to be in a more kunit style. Kunit isn't depended upon, it is hoped that this can be done in later patches for the sake of consistency.
v3. Fixes a missing null and out of bound skip reason load detected by
address sanitizer. This issue was reported by Jiri Olsa <[email protected]> with an address sanitizer reproduction provided by Sohaib Mohamed <[email protected]>.
v2. Gets to a point of the perf test test suite/case structs being
close facsimiles of the kunit ones. It also addresses feedback on the v1 RFC, in particular from Jiri Olsa <[email protected]>.
v1. Built/tested on x86.
Ian Rogers (22):
perf test: Use macro for "suite" declarations perf test: Use macro for "suite" definitions perf test: Make each test/suite its own struct. perf test: Move each test suite struct to its test perf test: Rename struct test to test_suite perf test: Add helper functions for abstraction. perf test: Add test case struct.
perf test: Add skip reason to test case. perf test: Convert pfm tests to use test cases. perf test: Convert pmu event tests to test cases. perf test: Convert watch point tests to test cases. perf test: Convert clang tests to test cases. perf test: Convert bpf tests to test cases. perf test: Convert llvm tests to test cases. perf test: Remove now unused subtest helpers perf test: bp tests use test case
perf test: Convert time to tsc test to test case. perf test: Remove non test case style support. perf test: BP tests, remove is_supported use perf test: TSC test, remove is_supported use perf test: Remove is_supported function perf test: Remove skip_if_fail
tools/perf/arch/arm/include/arch-tests.h | 2 +- tools/perf/arch/arm/tests/arch-tests.c | 18 +- tools/perf/arch/arm/tests/vectors-page.c | 2 +- tools/perf/arch/arm64/include/arch-tests.h | 2 +- tools/perf/arch/arm64/tests/arch-tests.c | 11 +- tools/perf/arch/powerpc/include/arch-tests.h | 2 +- tools/perf/arch/powerpc/tests/arch-tests.c | 12 +- tools/perf/arch/x86/include/arch-tests.h | 14 +- tools/perf/arch/x86/tests/arch-tests.c | 47 +- tools/perf/arch/x86/tests/bp-modify.c | 2 +- tools/perf/arch/x86/tests/insn-x86.c | 2 +- tools/perf/arch/x86/tests/intel-cqm.c | 2 +- .../x86/tests/intel-pt-pkt-decoder-test.c | 2 +- tools/perf/arch/x86/tests/rdpmc.c | 2 +- tools/perf/arch/x86/tests/sample-parsing.c | 2 +- tools/perf/tests/api-io.c | 6 +- tools/perf/tests/attr.c | 4 +- tools/perf/tests/backward-ring-buffer.c | 4 +- tools/perf/tests/bitmap.c | 4 +- tools/perf/tests/bp_account.c | 36 +- tools/perf/tests/bp_signal.c | 34 +- tools/perf/tests/bp_signal_overflow.c | 9 +- tools/perf/tests/bpf.c | 69 ++- tools/perf/tests/builtin-test.c | 578 ++++++------------ tools/perf/tests/clang.c | 54 +- tools/perf/tests/code-reading.c | 4 +- tools/perf/tests/cpumap.c | 10 +- tools/perf/tests/demangle-java-test.c | 4 +- tools/perf/tests/demangle-ocaml-test.c | 4 +- tools/perf/tests/dlfilter-test.c | 4 +- tools/perf/tests/dso-data.c | 10 +- tools/perf/tests/dwarf-unwind.c | 5 +- tools/perf/tests/event-times.c | 4 +- tools/perf/tests/event_update.c | 4 +- tools/perf/tests/evsel-roundtrip-name.c | 5 +- tools/perf/tests/evsel-tp-sched.c | 5 +- tools/perf/tests/expand-cgroup.c | 6 +- tools/perf/tests/expr.c | 4 +- tools/perf/tests/fdarray.c | 7 +- tools/perf/tests/genelf.c | 6 +- tools/perf/tests/hists_cumulate.c | 4 +- tools/perf/tests/hists_filter.c | 4 +- tools/perf/tests/hists_link.c | 4 +- tools/perf/tests/hists_output.c | 4 +- tools/perf/tests/is_printable_array.c | 4 +- tools/perf/tests/keep-tracking.c | 4 +- tools/perf/tests/kmod-path.c | 4 +- tools/perf/tests/llvm.c | 74 ++- tools/perf/tests/maps.c | 4 +- tools/perf/tests/mem.c | 4 +- tools/perf/tests/mem2node.c | 4 +- tools/perf/tests/mmap-basic.c | 4 +- tools/perf/tests/mmap-thread-lookup.c | 4 +- tools/perf/tests/openat-syscall-all-cpus.c | 5 +- tools/perf/tests/openat-syscall-tp-fields.c | 5 +- tools/perf/tests/openat-syscall.c | 5 +- tools/perf/tests/parse-events.c | 4 +- tools/perf/tests/parse-metric.c | 4 +- tools/perf/tests/parse-no-sample-id-all.c | 5 +- tools/perf/tests/pe-file-parsing.c | 6 +- tools/perf/tests/perf-hooks.c | 4 +- tools/perf/tests/perf-record.c | 4 +- tools/perf/tests/perf-time-to-tsc.c | 30 +- tools/perf/tests/pfm.c | 63 +- tools/perf/tests/pmu-events.c | 73 +-- tools/perf/tests/pmu.c | 4 +- tools/perf/tests/python-use.c | 4 +- tools/perf/tests/sample-parsing.c | 4 +- tools/perf/tests/sdt.c | 6 +- tools/perf/tests/stat.c | 11 +- tools/perf/tests/sw-clock.c | 4 +- tools/perf/tests/switch-tracking.c | 4 +- tools/perf/tests/task-exit.c | 4 +- tools/perf/tests/tests.h | 238 ++++---- tools/perf/tests/thread-map.c | 10 +- tools/perf/tests/thread-maps-share.c | 4 +- tools/perf/tests/time-utils-test.c | 4 +- tools/perf/tests/topology.c | 4 +- tools/perf/tests/unit_number__scnprintf.c | 4 +- tools/perf/tests/vmlinux-kallsyms.c | 5 +- tools/perf/tests/wp.c | 122 +--- tools/perf/util/c++/clang-c.h | 8 +- tools/perf/util/c++/clang-test.cpp | 6 +- 83 files changed, 812 insertions(+), 966 deletions(-)
Signature · 1 line
2.33.1.1089.g2158813163f-goog