aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linux.alibaba.com>2021-08-25 09:49:04 +0800
committerShuah Khan <skhan@linuxfoundation.org>2021-08-25 13:46:13 -0600
commitd538ddb97e066571e4fc58b832f40739621b42bb (patch)
tree18d662ebfca4f42afb9ee44bb0a357f4f1505c94 /tools
parentLinux 5.14-rc2 (diff)
downloadlinux-dev-d538ddb97e066571e4fc58b832f40739621b42bb.tar.xz
linux-dev-d538ddb97e066571e4fc58b832f40739621b42bb.zip
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/openat2/openat2_test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/openat2/openat2_test.c b/tools/testing/selftests/openat2/openat2_test.c
index d7ec1e7da0d0..1bddbe934204 100644
--- a/tools/testing/selftests/openat2/openat2_test.c
+++ b/tools/testing/selftests/openat2/openat2_test.c
@@ -22,7 +22,11 @@
* XXX: This is wrong on {mips, parisc, powerpc, sparc}.
*/
#undef O_LARGEFILE
+#ifdef __aarch64__
+#define O_LARGEFILE 0x20000
+#else
#define O_LARGEFILE 0x8000
+#endif
struct open_how_ext {
struct open_how inner;