selftests/net: Be consistent in kconfig checks
authorDmitry Safonov <0x7f454c46@gmail.com>
Fri, 23 Aug 2024 22:04:53 +0000 (23:04 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 27 Aug 2024 21:11:27 +0000 (14:11 -0700)
commitbc2468f98221a194769cac80051da6b86cc39c2f
tree9fa29b14502f870cdaf99c9f61e2a7fe964b60c6
parent7053e788ded5f8ec589e4507d764d6a894780d6c
selftests/net: Be consistent in kconfig checks

Most of the functions in tcp-ao lib/ return negative errno or -1 in case
of a failure. That creates inconsistencies in lib/kconfig, which saves
what was the error code. As well as the uninitialized kconfig value is
-1, which also may be the result of a check.

Define KCONFIG_UNKNOWN and save negative return code, rather than
libc-style errno.

Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>
Link: https://patch.msgid.link/20240823-tcp-ao-selftests-upd-6-12-v4-3-05623636fe8c@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/tcp_ao/lib/kconfig.c