mbox series

[v5,00/19] selftests/resctrl: Fixes and cleanups

Message ID 20230717131507.32420-1-ilpo.jarvinen@linux.intel.com (mailing list archive)
Headers show
Series selftests/resctrl: Fixes and cleanups | expand

Message

Ilpo Järvinen July 17, 2023, 1:14 p.m. UTC
Here is a series with some fixes and cleanups to resctrl selftests.

v5:
- Improve changelogs
- Close fd_lm only in cat_val()
- Improve unmount error handling

v4:
- Move resctrlfs (unconditional) umount after resctrl fs support check

v3:
- Don't include rewritten CAT test into this series!
- Tweak wildcard style in Makefile
- Fix many changelog typos, remove some wrong claims, and generally
  improve them.
- Add fix to PARENT_EXIT() to unmount resctrl FS
- Add unmounting resctrl FS before starting any tests
- Add fix for buf leak
- Add fix for perf fd closing
- Split mount/remount/umount patches differently
- Use size_t and %zu for span
- Keep MBM print as MB, only internally use span in bytes
- Drop start_buf global from fill_buf


v2 (was sent with CAT test rewrite which is no longer included in v3):
- Rebased on top of next to solve the conflicts
- Added 2 patches related to resctrl FS mount/umount (fix + cleanup)
- Consistently use "alloc" in cache_alloc_size()
- CAT test error handling tweaked
- Remove a spurious newline change from the CAT patch
- Small improvements to changelogs

Ilpo Järvinen (19):
  selftests/resctrl: Add resctrl.h into build deps
  selftests/resctrl: Don't leak buffer in fill_cache()
  selftests/resctrl: Unmount resctrl FS if child fails to run benchmark
  selftests/resctrl: Close perf value read fd on errors
  selftests/resctrl: Unmount resctrl FS before starting the first test
  selftests/resctrl: Move resctrl FS mount/umount to higher level
  selftests/resctrl: Refactor remount_resctrl(bool mum_resctrlfs) to
    mount_resctrl()
  selftests/resctrl: Remove mum_resctrlfs from struct resctrl_val_param
  selftests/resctrl: Convert span to size_t
  selftests/resctrl: Express span internally in bytes
  selftests/resctrl: Remove duplicated preparation for span arg
  selftests/resctrl: Remove "malloc_and_init_memory" param from
    run_fill_buf()
  selftests/resctrl: Remove unnecessary startptr global from fill_buf
  selftests/resctrl: Improve parameter consistency in fill_buf
  selftests/resctrl: Don't pass test name to fill_buf
  selftests/resctrl: Don't use variable argument list for ->setup()
  selftests/resctrl: Move CAT/CMT test global vars to function they are
    used in
  selftests/resctrl: Pass the real number of tests to show_cache_info()
  selftests/resctrl: Remove test type checks from cat_val()

 tools/testing/selftests/resctrl/Makefile      |  2 +-
 tools/testing/selftests/resctrl/cache.c       | 66 +++++++-------
 tools/testing/selftests/resctrl/cat_test.c    | 28 ++----
 tools/testing/selftests/resctrl/cmt_test.c    | 29 ++-----
 tools/testing/selftests/resctrl/fill_buf.c    | 87 +++++++------------
 tools/testing/selftests/resctrl/mba_test.c    |  9 +-
 tools/testing/selftests/resctrl/mbm_test.c    | 17 ++--
 tools/testing/selftests/resctrl/resctrl.h     | 17 ++--
 .../testing/selftests/resctrl/resctrl_tests.c | 83 ++++++++++++------
 tools/testing/selftests/resctrl/resctrl_val.c |  7 +-
 tools/testing/selftests/resctrl/resctrlfs.c   | 64 +++++++-------
 11 files changed, 178 insertions(+), 231 deletions(-)

Comments

Babu Moger July 17, 2023, 3:11 p.m. UTC | #1
Hi Ilpo, Thanks for the patches. I did a quick test on AMD machine.
There are no failures. They look good.

Some of the MBA tests are skipped for AMD. I will take that up later.

Tested-by: Babu Moger <babu.moger@amd.com>
Shaopeng Tan (Fujitsu) July 18, 2023, 6:47 a.m. UTC | #2
Hi Ilpo,

> Here is a series with some fixes and cleanups to resctrl selftests.
> 
> v5:
> - Improve changelogs
> - Close fd_lm only in cat_val()
> - Improve unmount error handling
> 

I reviewed this patch series,
and ran resctrl selftest on Intel(R) Xeon(R) Gold 6254 CPU, 
they look good.

<Tested-by:tan.shaopeng@jp.fujitsu.com>
<Reviewed-by:tan.shaopeng@jp.fujitsu.com>
Shuah Khan July 25, 2023, 2:55 p.m. UTC | #3
On 7/17/23 07:14, Ilpo Järvinen wrote:
> Here is a series with some fixes and cleanups to resctrl selftests.
> 
> v5:
> - Improve changelogs
> - Close fd_lm only in cat_val()
> - Improve unmount error handling
> 

Applied to linux-kselftest next for Linux 6.6-rc1

thanks,
-- Shuah