selftests: vDSO: look for arch-specific function name in getrandom test
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 22 Aug 2024 07:13:22 +0000 (09:13 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 30 Aug 2024 13:44:38 +0000 (15:44 +0200)
commite1bbcab496f745d963e43a6e0f669359e82c4934
treeef746a10f9dc8ca8f673a1c3cc0937c8add2630f
parentf8d92fc527ff0388b2e94c101afb0e5c7496199f
selftests: vDSO: look for arch-specific function name in getrandom test

Don't hard-code x86 specific names. Rather, use vdso_config definitions
to find the correct function matching the architecture.

Add random VDSO function names in names[][]. Remove the #ifdef
CONFIG_VDSO32, as having the name there all the time is harmless and
guaranties a steady index for following strings.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
[Jason: add [6] to variable declaration rather than each usage site.]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
tools/testing/selftests/vDSO/vdso_config.h
tools/testing/selftests/vDSO/vdso_test_getrandom.c