Files
linux/tools
Wake Liu bc4c0a48bd selftests/net: Ensure assert() triggers in psock_tpacket.c
The get_next_frame() function in psock_tpacket.c was missing a return
statement in its default switch case, leading to a compiler warning.

This was caused by a `bug_on(1)` call, which is defined as an
`assert()`, being compiled out because NDEBUG is defined during the
build.

Instead of adding a `return NULL;` which would silently hide the error
and could lead to crashes later, this change restores the original
author's intent. By adding `#undef NDEBUG` before including <assert.h>,
we ensure the assertion is active and will cause the test to abort if
this unreachable code is ever executed.

Signed-off-by: Wake Liu <wakel@google.com>
Link: https://patch.msgid.link/20250809062013.2407822-1-wakel@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-08-11 20:12:23 -07:00
..
2025-06-26 10:51:41 -07:00
2025-07-23 11:55:22 +02:00
2025-03-06 15:13:13 -04:00
2025-04-22 19:10:04 +01:00
2025-07-28 16:47:35 -04:00
2025-04-28 17:18:48 -07:00