[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251113-vdso-test-types-v2-5-0427eff70d08@linutronix.de>
Date: Thu, 13 Nov 2025 16:30:21 +0100
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Andy Lutomirski <luto@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Shuah Khan <shuah@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org,
Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Subject: [PATCH v2 05/14] selftests: vDSO: vdso_test_gettimeofday: Use
types from vdso_types.h
The libc types are not necessarily compatible with the vDSO functions.
Use the dedicated types from vdso_types.h instead.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
---
tools/testing/selftests/vDSO/vdso_test_gettimeofday.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c b/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c
index 636a56ccf8e4e7943ca446fe3fad6897598ca77f..3c14ed654428e0dbe08e9d44671e82737ac61486 100644
--- a/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c
+++ b/tools/testing/selftests/vDSO/vdso_test_gettimeofday.c
@@ -12,12 +12,12 @@
#include <stdio.h>
#include <sys/auxv.h>
-#include <sys/time.h>
#include "../kselftest.h"
#include "parse_vdso.h"
#include "vdso_config.h"
#include "vdso_call.h"
+#include "vdso_types.h"
int main(int argc, char **argv)
{
@@ -33,15 +33,14 @@ int main(int argc, char **argv)
vdso_init_from_sysinfo_ehdr(getauxval(AT_SYSINFO_EHDR));
/* Find gettimeofday. */
- typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz);
- gtod_t gtod = (gtod_t)vdso_sym(version, name[0]);
+ vdso_gettimeofday_t gtod = (vdso_gettimeofday_t)vdso_sym(version, name[0]);
if (!gtod) {
printf("Could not find %s\n", name[0]);
return KSFT_SKIP;
}
- struct timeval tv;
+ struct __kernel_old_timeval tv;
long ret = VDSO_CALL(gtod, 2, &tv, 0);
if (ret == 0) {
--
2.51.0
Powered by blists - more mailing lists