Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH 1/5] selftests: vdso: Fix vDSO name for powerpc
@ 2024-08-30 12:28 Christophe Leroy
  2024-08-30 12:28 ` [PATCH 2/5] selftests: vdso: Fix vdso_config " Christophe Leroy
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Christophe Leroy @ 2024-08-30 12:28 UTC (permalink / raw)
  To: Shuah Khan, Vincenzo Frascino, Thomas Gleixner, Andy Lutomirski,
	H. Peter Anvin, Mark Brown, Jason A. Donenfeld
  Cc: Christophe Leroy, linux-kselftest, linux-kernel, linuxppc-dev

Following error occurs when running vdso_test_correctness on powerpc:

~ # ./vdso_test_correctness
[WARN]	failed to find vDSO
[SKIP]	No vDSO, so skipping clock_gettime() tests
[SKIP]	No vDSO, so skipping clock_gettime64() tests
[RUN]	Testing getcpu...
[OK]	CPU 0: syscall: cpu 0, node 0

On powerpc, vDSO is neither called linux-vdso.so.1 nor linux-gate.so.1
but linux-vdso32.so.1 or linux-vdso64.so.1.

Also search those two names before giving up.

Fixes: c7e5789b24d3 ("kselftest: Move test_vdso to the vDSO test suite")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 tools/testing/selftests/vDSO/vdso_test_correctness.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/testing/selftests/vDSO/vdso_test_correctness.c b/tools/testing/selftests/vDSO/vdso_test_correctness.c
index e691a3cf1491..cdb697ae8343 100644
--- a/tools/testing/selftests/vDSO/vdso_test_correctness.c
+++ b/tools/testing/selftests/vDSO/vdso_test_correctness.c
@@ -114,6 +114,12 @@ static void fill_function_pointers()
 	if (!vdso)
 		vdso = dlopen("linux-gate.so.1",
 			      RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
+	if (!vdso)
+		vdso = dlopen("linux-vdso32.so.1",
+			      RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
+	if (!vdso)
+		vdso = dlopen("linux-vdso64.so.1",
+			      RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
 	if (!vdso) {
 		printf("[WARN]\tfailed to find vDSO\n");
 		return;
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-08-30 13:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30 12:28 [PATCH 1/5] selftests: vdso: Fix vDSO name for powerpc Christophe Leroy
2024-08-30 12:28 ` [PATCH 2/5] selftests: vdso: Fix vdso_config " Christophe Leroy
2024-08-30 12:28 ` [PATCH 3/5] selftests: vdso: Fix vDSO symbols lookup for powerpc64 Christophe Leroy
2024-08-30 12:28 ` [PATCH 4/5] selftests: vdso: Fix the way vDSO functions are called for powerpc Christophe Leroy
2024-08-30 12:28 ` [PATCH 5/5] selftests: vdso: Use parse_vdso.h in vdso_test_abi Christophe Leroy
2024-08-30 12:41 ` [PATCH 1/5] selftests: vdso: Fix vDSO name for powerpc Jason A. Donenfeld
2024-08-30 13:34   ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox