diff mbox series

[v4,4/4] selftests/vDSO: Enable vdso getrandom tests for LoongArch

Message ID 20240827132018.88854-5-xry111@xry111.site
State New
Headers show
Series LoongArch: Implement getrandom() in vDSO | expand

Commit Message

Xi Ruoyao Aug. 27, 2024, 1:20 p.m. UTC
Create the symlink to the LoongArch vdso directory, and correct set ARCH
for LoongArch.

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
---
 tools/arch/loongarch/vdso             | 1 +
 tools/testing/selftests/vDSO/Makefile | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
 create mode 120000 tools/arch/loongarch/vdso

Comments

Xi Ruoyao Aug. 27, 2024, 2:45 p.m. UTC | #1
On Tue, 2024-08-27 at 16:00 +0200, Jason A. Donenfeld wrote:
> On Tue, Aug 27, 2024 at 09:20:17PM +0800, Xi Ruoyao wrote:
> > Create the symlink to the LoongArch vdso directory, and correct set ARCH
> > for LoongArch.
> 
> FYI, I think you can squash this into your 1/4 commit. Ideally this
> whole series reduces down to 1 commit, once I take the two general bug
> fixups you're finding.

Ok I'll squash them.
diff mbox series

Patch

diff --git a/tools/arch/loongarch/vdso b/tools/arch/loongarch/vdso
new file mode 120000
index 000000000000..ebda43a82db7
--- /dev/null
+++ b/tools/arch/loongarch/vdso
@@ -0,0 +1 @@ 
+../../../arch/loongarch/vdso
\ No newline at end of file
diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile
index e346890d4c91..2ad98afce111 100644
--- a/tools/testing/selftests/vDSO/Makefile
+++ b/tools/testing/selftests/vDSO/Makefile
@@ -1,6 +1,6 @@ 
 # SPDX-License-Identifier: GPL-2.0
 uname_M := $(shell uname -m 2>/dev/null || echo not)
-ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
+ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/ -e /loongarch/s/[0-9]//g)
 SODIUM := $(shell pkg-config --libs --cflags libsodium 2>/dev/null)
 
 TEST_GEN_PROGS := vdso_test_gettimeofday
@@ -11,7 +11,7 @@  ifeq ($(ARCH),$(filter $(ARCH),x86 x86_64))
 TEST_GEN_PROGS += vdso_standalone_test_x86
 endif
 TEST_GEN_PROGS += vdso_test_correctness
-ifeq ($(uname_M),x86_64)
+ifeq ($(uname_M),$(filter $(uname_M),x86_64 loongarch64))
 TEST_GEN_PROGS += vdso_test_getrandom
 ifneq ($(SODIUM),)
 TEST_GEN_PROGS += vdso_test_chacha