selftests: netconsole: Do not exit from inside the validation function
authorBreno Leitao <leitao@debian.org>
Mon, 9 Jun 2025 09:46:28 +0000 (02:46 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 10 Jun 2025 21:21:53 +0000 (14:21 -0700)
commit69b25dd20c8368750d1e8b12cfe31387c545bdd1
tree04e1c5d662f15ef8a7d9884452f8e9fce307310f
parente99d938f867173937373b1bb08cbc2d102a07d0c
selftests: netconsole: Do not exit from inside the validation function

Remove the exit call from validate_result() function and move the
test exit logic to the main script. This allows the function to
be reused in scenarios where the test needs to continue execution
after validation, rather than terminating immediately.

The validate_result() function should focus on validation logic
only, while the calling script maintains control over program
flow and exit conditions. This change improves code modularity
and prepares for potential future enhancements where multiple
validations might be needed in a single test run.

Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20250609-netcons_ext-v3-3-5336fa670326@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/lib/sh/lib_netcons.sh
tools/testing/selftests/drivers/net/netcons_basic.sh