Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: openat2: Fix testing failure for O_LARGEFILE flag

The openat2 test suite fails on ARM64 because the definition of
O_LARGEFILE is different on ARM64. Fix the problem by defining
the correct O_LARGEFILE definition on ARM64.

"openat2 unexpectedly returned # 3['.../tools/testing/selftests/openat2']
with 208000 (!= 208000)
not ok 102 openat2 with incompatible flags (O_PATH | O_LARGEFILE) fails
with -22 (Invalid argument)"

Fixed change log to improve formatting and clarity:
Shuah Khan <skhan@linuxfoundation.org>

Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Aleksa Sarai <cyphar@cyphar.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Baolin Wang and committed by
Shuah Khan
d538ddb9 2734d6c1

+4
+4
tools/testing/selftests/openat2/openat2_test.c
··· 22 22 * XXX: This is wrong on {mips, parisc, powerpc, sparc}. 23 23 */ 24 24 #undef O_LARGEFILE 25 + #ifdef __aarch64__ 26 + #define O_LARGEFILE 0x20000 27 + #else 25 28 #define O_LARGEFILE 0x8000 29 + #endif 26 30 27 31 struct open_how_ext { 28 32 struct open_how inner;