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)
commit79ee8aa31d518c1fd5f3b1b1ac39dd1fb4dc7039
treee66c9ada765c5bee06d4fff53acd633db13d683e
parent63e6b2a42342c3297cce286fb124c99be9e0f3fd
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