Skip to content

selftests/resctrl: Rework benchmark command handling

Ilpo Järvinen linux-kselftest lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest8 patches 4 repliesIn review
  2. v48 patches 6 repliesSuperseded
  3. v37 patches 9 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v27 patches0 repliesSuperseded
v17 patches19 repliesSuperseded

Changes in v5 from the cover letter

- Fix another off-by-one error
- Reorder local var declarations in main() to follow rev. xmas tree

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8selftests/resctrl: Ensure the benchmark commands fits to its arraytools/testing/selftests/resctrl/resctrl_tests.c+5 -01 reply
2/8selftests/resctrl: Correct benchmark command helptools/testing/selftests/resctrl/resctrl_tests.c+2 -20 replies
3/8selftests/resctrl: Remove bw_report and bm_type from main()tools/testing/selftests/resctrl/mba_test.c tools/testing/selftests/resctrl/mbm_test.c tools/testing/selftests/resctrl/resctrl.h +1 more+13 -170 replies
4/8selftests/resctrl: Simplify span lifetimetools/testing/selftests/resctrl/cache.c tools/testing/selftests/resctrl/cat_test.c tools/testing/selftests/resctrl/cmt_test.c +3 more+26 -250 replies
5/8selftests/resctrl: Reorder resctrl FS prep code and benchmark_cmd inittools/testing/selftests/resctrl/resctrl_tests.c+8 -80 replies
6/8selftests/resctrl: Make benchmark command const and build it with pointerstools/testing/selftests/resctrl/cmt_test.c tools/testing/selftests/resctrl/mba_test.c tools/testing/selftests/resctrl/mbm_test.c +3 more+53 -350 replies
7/8selftests/resctrl: Remove ben_count variabletools/testing/selftests/resctrl/resctrl_tests.c+2 -30 replies
8/8selftests/resctrl: Cleanup benchmark argument parsingtools/testing/selftests/resctrl/resctrl_tests.c+23 -230 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchShaopeng TanWieczor-Retman, MaciejReinette ChatreBabu Moger
SeriesT-b
1/8T-b R-b R-b R-b
2/8T-b R-b R-b R-b
3/8T-b R-b R-b R-b
4/8T-b R-b R-b R-b
5/8R-b R-b
6/8T-b R-b R-b R-b
7/8T-b R-b R-b R-b
8/8T-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/8] selftests/resctrl: Rework benchmark command handling

The benchmark command handling (-b) in resctrl selftests is overly complicated code. This series turns the benchmark command immutable to preserve it for all selftests and improves benchmark command related error handling.

This series also ends up removing the strcpy() calls which were pointed out earlier.

v5:
- Fix another off-by-one error
- Reorder local var declarations in main() to follow rev. xmas tree

v4:
- Correct off-by-one error in -b processing
- Reordered code in main() to make freeing span_str simpler (in new patch)
- Use consistent style for const char * const *

v3:
- Removed DEFAULT_SPAN_STR for real and the duplicated copy of defines that made to v2 likely due to my incorrect conflict resolutions

v2:
- Added argument length check into patch 1/7
- Updated also -b line in help message.
- Document -b argument related "algorithm"
- Use asprintf() to convert defined constant int to string
- Improved changelog texts
- Added \n to ksft_exit_fail_msg() call messages.
- Print DEFAULT_SPAN with %u instead of %zu to avoid need to cast it

Ilpo Järvinen (8):
selftests/resctrl: Ensure the benchmark commands fits to its array selftests/resctrl: Correct benchmark command help selftests/resctrl: Remove bw_report and bm_type from main() selftests/resctrl: Simplify span lifetime selftests/resctrl: Reorder resctrl FS prep code and benchmark_cmd init selftests/resctrl: Make benchmark command const and build it with
pointers
selftests/resctrl: Remove ben_count variable selftests/resctrl: Cleanup benchmark argument parsing

 tools/testing/selftests/resctrl/cache.c       |   5 +-
 tools/testing/selftests/resctrl/cat_test.c    |  13 +--
 tools/testing/selftests/resctrl/cmt_test.c    |  34 ++++--
 tools/testing/selftests/resctrl/mba_test.c    |   4 +-
 tools/testing/selftests/resctrl/mbm_test.c    |   7 +-
 tools/testing/selftests/resctrl/resctrl.h     |  16 +--
 .../testing/selftests/resctrl/resctrl_tests.c | 100 ++++++++----------
 tools/testing/selftests/resctrl/resctrl_val.c |  10 +-
 8 files changed, 104 insertions(+), 85 deletions(-)
Signature · 1 line
2.30.2