]> git.dujemihanovic.xyz Git - linux.git/commit
selftests/harness: allow tests to be skipped during setup
authorMagali Lemes <magali.lemes@canonical.com>
Tue, 13 Jun 2023 12:32:19 +0000 (09:32 -0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 16 Jun 2023 05:24:01 +0000 (22:24 -0700)
commit372b304c1e517c4d3e5b6ca6c9cfb20f027c3b03
treef6bd09365ff7152f2d2d4b104147a27384ab1ae8
parent40f71e7cd3c6ac04293556ab0504a372393838ff
selftests/harness: allow tests to be skipped during setup

Before executing each test from a fixture, FIXTURE_SETUP is run once.
When SKIP is used in FIXTURE_SETUP, the setup function returns early
but the test still proceeds to run, unless another SKIP macro is used
within the test definition, leading to some code repetition. Therefore,
allow tests to be skipped directly from the setup function.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/kselftest_harness.h