Re: [PATCH v4] selftests/futex: Convert 32bit timespec struct to 64bit version for 32bit compatibility mode
From: André Almeida
Date: Fri Jul 04 2025 - 11:49:57 EST
Hi Terry
Em 04/07/2025 07:35, Terry Tritton escreveu:
sys_futex_wait() can not accept old_timespec32 struct, so userspace should
convert it from 32bit to 64bit before syscall to support 32bit compatible mode.
This fix is based off [1]
Link: https://lore.kernel.org/all/20231203235117.29677-1-wegao@xxxxxxxx/ [1]
Originally-by: Wei Gao <wegao@xxxxxxxx>
Signed-off-by: Terry Tritton <terry.tritton@xxxxxxxxxx>
---
Thanks! It fixes the test when compiling with -m32.
However, please check the results ./scripts/checkpatch.pl, there are a
lot of codestyle errors:
ERROR: trailing whitespace
#37: FILE: tools/testing/selftests/futex/include/futex2test.h:69:
+ struct __kernel_timespec ts = { $
ERROR: code indent should use tabs where possible
#37: FILE: tools/testing/selftests/futex/include/futex2test.h:69:
+ struct __kernel_timespec ts = { $
WARNING: please, no spaces at the start of a line
#37: FILE: tools/testing/selftests/futex/include/futex2test.h:69:
+ struct __kernel_timespec ts = { $
ERROR: trailing whitespace
#38: FILE: tools/testing/selftests/futex/include/futex2test.h:70:
+ .tv_sec = timo->tv_sec, $
ERROR: code indent should use tabs where possible
#38: FILE: tools/testing/selftests/futex/include/futex2test.h:70:
+ .tv_sec = timo->tv_sec, $
...