summaryrefslogtreecommitdiffstats
path: root/net/6lowpan
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2022-03-24 16:19:06 -0700
committerShuah Khan <skhan@linuxfoundation.org>2022-04-04 13:37:37 -0600
commit63e6b2a42342c3297cce286fb124c99be9e0f3fd (patch)
treef59175e765c1ba913867f02ea66334d3ab1dc685 /net/6lowpan
parent187816d07729ff88e75d84efbc668642106cebf3 (diff)
downloadlinux-63e6b2a42342c3297cce286fb124c99be9e0f3fd.tar.bz2
selftests/harness: Run TEARDOWN for ASSERT failures
The kselftest test harness has traditionally not run the registered TEARDOWN handler when a test encountered an ASSERT. This creates unexpected situations and tests need to be very careful about using ASSERT, which seems a needless hurdle for test writers. Because of the harness's design for optional failure handlers, the original implementation of ASSERT used an abort() to immediately stop execution, but that meant the context for running teardown was lost. Instead, use setjmp/longjmp so that teardown can be done. Failed SETUP routines continue to not be followed by TEARDOWN, though. Cc: Andy Lutomirski <luto@amacapital.net> Cc: Will Drewry <wad@chromium.org> Cc: Shuah Khan <shuah@kernel.org> Cc: linux-kselftest@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'net/6lowpan')
0 files changed, 0 insertions, 0 deletions