]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/harness: Pass variant to teardown
authorWillem de Bruijn <willemb@google.com>
Thu, 24 Mar 2022 23:19:07 +0000 (16:19 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 4 Apr 2022 19:37:48 +0000 (13:37 -0600)
commit372fe84c030d1e76d6dec5d21f7e0a63ce98e67e
treee66c9ada765c5bee06d4fff53acd633db13d683e
parent489bd6c37de038998be1945f44b3bf83c90b50cf
selftests/harness: Pass variant to teardown

FIXTURE_VARIANT data is passed to FIXTURE_SETUP and TEST_F as "variant".

In some cases, the variant will change the setup, such that expectations
also change on teardown. Also pass variant to FIXTURE_TEARDOWN.

The new FIXTURE_TEARDOWN logic is identical to that in FIXTURE_SETUP,
right above.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20201210231010.420298-1-willemdebruijn.kernel@gmail.com
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/kselftest_harness.h