mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
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>
This commit is contained in:
parent
e99d938f86
commit
69b25dd20c
|
|
@ -185,7 +185,6 @@ function validate_result() {
|
|||
# Delete the file once it is validated, otherwise keep it
|
||||
# for debugging purposes
|
||||
rm "${TMPFILENAME}"
|
||||
exit "${ksft_pass}"
|
||||
}
|
||||
|
||||
function check_for_dependencies() {
|
||||
|
|
|
|||
|
|
@ -50,3 +50,5 @@ busywait "${BUSYWAIT_TIMEOUT}" test -s "${OUTPUT_FILE}"
|
|||
# Make sure the message was received in the dst part
|
||||
# and exit
|
||||
validate_result "${OUTPUT_FILE}"
|
||||
|
||||
exit "${ksft_pass}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user