[v4,0/7] selftests/resctrl: Fixes to failing tests

Message ID 20231002094813.6633-1-ilpo.jarvinen@linux.intel.com
Headers
Series selftests/resctrl: Fixes to failing tests |

Message

Ilpo Järvinen Oct. 2, 2023, 9:48 a.m. UTC
  Fix four issues with resctrl selftests.

The signal handling fix became necessary after the mount/umount fixes
and the uninitialized member bug was discovered during the review.

The other two came up when I ran resctrl selftests across the server
fleet in our lab to validate the upcoming CAT test rewrite (the rewrite
is not part of this series).

These are developed and should apply cleanly at least on top the
benchmark cleanup series (might apply cleanly also w/o the benchmark
series, I didn't test).

v4:
- Use func(void) for functions taking no arguments
- Correct Fixes tag formatting

v3:
- Add fix to uninitialized sa_flags
- Handle ksft_exit_fail_msg() in per test functions
- Make signal handler register fails to also exit
- Improve changelogs

v2:
- Include patch to move _GNU_SOURCE to Makefile to allow normal #include
  placement
- Rework the signal register/unregister into patch to use helpers
- Fixed incorrect function parameter description
- Use return !!res to avoid confusing implicit boolean conversion
- Improve MBA/MBM success bound patch's changelog
- Tweak Cc: stable dependencies (make it a chain).


Ilpo Järvinen (7):
  selftests/resctrl: Fix uninitialized .sa_flags
  selftests/resctrl: Extend signal handler coverage to unmount on
    receiving signal
  selftests/resctrl: Remove duplicate feature check from CMT test
  selftests/resctrl: Move _GNU_SOURCE define into Makefile
  selftests/resctrl: Refactor feature check to use resource and feature
    name
  selftests/resctrl: Fix feature checks
  selftests/resctrl: Reduce failures due to outliers in MBA/MBM tests

 tools/testing/selftests/resctrl/Makefile      |  2 +-
 tools/testing/selftests/resctrl/cat_test.c    |  8 --
 tools/testing/selftests/resctrl/cmt_test.c    |  3 -
 tools/testing/selftests/resctrl/mba_test.c    |  2 +-
 tools/testing/selftests/resctrl/mbm_test.c    |  2 +-
 tools/testing/selftests/resctrl/resctrl.h     |  7 +-
 .../testing/selftests/resctrl/resctrl_tests.c | 82 ++++++++++++-------
 tools/testing/selftests/resctrl/resctrl_val.c | 26 +++---
 tools/testing/selftests/resctrl/resctrlfs.c   | 69 ++++++----------
 9 files changed, 97 insertions(+), 104 deletions(-)
  

Comments

Ilpo Järvinen Oct. 2, 2023, 11:31 a.m. UTC | #1
On Mon, 2 Oct 2023, Ilpo Järvinen wrote:

> Fix four issues with resctrl selftests.
> 
> The signal handling fix became necessary after the mount/umount fixes
> and the uninitialized member bug was discovered during the review.
> 
> The other two came up when I ran resctrl selftests across the server
> fleet in our lab to validate the upcoming CAT test rewrite (the rewrite
> is not part of this series).
> 
> These are developed and should apply cleanly at least on top the
> benchmark cleanup series (might apply cleanly also w/o the benchmark
> series, I didn't test).

LKP seems to no longer happy to apply this cleanly without the benchmark 
rework series as the signal handling fix got now a bigger footprint 
(maybe LKP didn't build v3 at all as the changes from v3->v4 were really 
small and I did not get error out of v3).

Shuah, would you want me to reorganize this such that it goes in before 
the benchmark series? In any case, I'll wait until Reinette has had time 
to look at the first patch if I'm to send the series reordered.
  
Reinette Chatre Oct. 2, 2023, 3:49 p.m. UTC | #2
On 10/2/2023 4:31 AM, Ilpo Järvinen wrote:
> On Mon, 2 Oct 2023, Ilpo Järvinen wrote:
> 
>> Fix four issues with resctrl selftests.
>>
>> The signal handling fix became necessary after the mount/umount fixes
>> and the uninitialized member bug was discovered during the review.
>>
>> The other two came up when I ran resctrl selftests across the server
>> fleet in our lab to validate the upcoming CAT test rewrite (the rewrite
>> is not part of this series).
>>
>> These are developed and should apply cleanly at least on top the
>> benchmark cleanup series (might apply cleanly also w/o the benchmark
>> series, I didn't test).
> 
> LKP seems to no longer happy to apply this cleanly without the benchmark 
> rework series as the signal handling fix got now a bigger footprint 
> (maybe LKP didn't build v3 at all as the changes from v3->v4 were really 
> small and I did not get error out of v3).
> 
> Shuah, would you want me to reorganize this such that it goes in before 
> the benchmark series? In any case, I'll wait until Reinette has had time 
> to look at the first patch if I'm to send the series reordered.

That sounds unnecessary to me because I assume that doing such reorganization
would require a new version of the benchmark series [1] that has been ready for
a while now.

Both series look good to me. I just added my "Reviewed-by" to the first patch of
this series and it (this series) applies cleanly on top of the benchmark series.

Reinette

[1] https://lore.kernel.org/lkml/20230904095339.11321-1-ilpo.jarvinen@linux.intel.com/
  
Shaopeng Tan (Fujitsu) Oct. 10, 2023, 12:17 a.m. UTC | #3
Hi Ilpo,

I ran the test set on Intel(R) Xeon(R) Gold 6254 CPU.
There is no problem.

Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>

Best regards,
Shaopeng TAN