kselftest: Fix vdso_test_abi return status
authorVincenzo Frascino <vincenzo.frascino@arm.com>
Mon, 31 Jan 2022 11:34:05 +0000 (11:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:03:06 +0000 (12:03 +0100)
commit46756cc81099e298d599059de679ba2e92f2d5ce
treeb03e33b743ad115c19b5623b361643d911965643
parent3801775a07b5e1adba0bc86982133b423d64433f
kselftest: Fix vdso_test_abi return status

[ Upstream commit ec049891b2dc16591813eacaddc476b3d27c8c14 ]

vdso_test_abi contains a batch of tests that verify the validity of the
vDSO ABI.

When a vDSO symbol is not found the relevant test is skipped reporting
KSFT_SKIP. All the tests return values are then added in a single
variable which is checked to verify failures. This approach can have
side effects which result in reporting the wrong kselftest exit status.

Fix vdso_test_abi verifying the return code of each test separately.

Cc: Shuah Khan <shuah@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/vDSO/vdso_test_abi.c