Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: kselftest: Add ksft_reset_state()

Add a helper to reset the internal state of the kselftest framework.
It will be used by the selftest harness.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://lore.kernel.org/r/20260302-kselftest-harness-v2-2-3143aa41d989@linutronix.de
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Thomas Weißschuh and committed by
Shuah Khan
d431ea86 758b8905

+11
+11
tools/testing/selftests/kselftest.h
··· 476 476 return major > min_major || (major == min_major && minor >= min_minor); 477 477 } 478 478 479 + static inline void ksft_reset_state(void) 480 + { 481 + ksft_cnt.ksft_pass = 0; 482 + ksft_cnt.ksft_fail = 0; 483 + ksft_cnt.ksft_xfail = 0; 484 + ksft_cnt.ksft_xpass = 0; 485 + ksft_cnt.ksft_xskip = 0; 486 + ksft_cnt.ksft_error = 0; 487 + ksft_plan = 0; 488 + } 489 + 479 490 #endif /* __KSELFTEST_H */