On 10/5/24 22:40, Jason A. Donenfeld wrote:
Rather than using symlinks to find the vgetrandom-chacha.S file for each arch, store this in a file that uses the compiler to determine architecture, and then make use of weak symbols to skip the test on architectures that don't provide the code.
Signed-off-by: Jason A. Donenfeld Jason@zx2c4.com
tools/arch/arm64/vdso | 1 - tools/arch/loongarch/vdso | 1 - tools/arch/powerpc/vdso | 1 - tools/arch/s390/vdso | 1 - tools/arch/x86/vdso | 1 - tools/testing/selftests/vDSO/Makefile | 6 +----- tools/testing/selftests/vDSO/vdso_test_chacha.c | 6 ++++++ .../selftests/vDSO/vgetrandom-chacha-finder.S | 16 ++++++++++++++++ 8 files changed, 23 insertions(+), 10 deletions(-) delete mode 120000 tools/arch/arm64/vdso delete mode 120000 tools/arch/loongarch/vdso delete mode 120000 tools/arch/powerpc/vdso delete mode 120000 tools/arch/s390/vdso delete mode 120000 tools/arch/x86/vdso create mode 100644 tools/testing/selftests/vDSO/vgetrandom-chacha-finder.S
Jason,
I am seeing a few checkpatch warnings on this patch. They are worth looking at.
WARNING: Prefer __weak over __attribute__((weak)) #176: FILE: tools/testing/selftests/vDSO/vdso_test_chacha.c:81: +__attribute__((weak))
WARNING: Improper SPDX comment style for 'tools/testing/selftests/vDSO/vgetrandom-chacha-finder.S', please use '/*' instead #191: FILE: tools/testing/selftests/vDSO/vgetrandom-chacha-finder.S:1: +// SPDX-License-Identifier: GPL-2.0
WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 #191: FILE: tools/testing/selftests/vDSO/vgetrandom-chacha-finder.S:1: +// SPDX-License-Identifier: GPL-2.0
thanks, -- Shuah