mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 11:03:07 -04:00
Add an example test suite name 'example_test_skip_suite' to 'kunit-example-test.c' that shows how to skip an entire test suite based on runtime conditions. The example suite 'example_skip_suite' provides a 'suite_init' callback named example_skip_suite_init() which marks the entire suite as skipped using kunit_mark_skipped(). This demonstrates a way for conditionally skipping test suites when any prerequisites for kunit_suite execution are not met. The 'suite_init' callback can perform any necessary checks and mark the suite as skipped, preventing all test cases from executing while also indicating why the suite was skipped. Link: https://lore.kernel.org/r/20260626085811.151133-3-vaibhav@linux.ibm.com Reviewed-by: David Gow <david@davidgow.net> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>