lkml.org 
[lkml]   [2021]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.10 42/53] selftests: openat2: Fix testing failure for O_LARGEFILE flag
    Date
    From: Baolin Wang <baolin.wang@linux.alibaba.com>

    [ Upstream commit d538ddb97e066571e4fc58b832f40739621b42bb ]

    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>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    tools/testing/selftests/openat2/openat2_test.c | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/tools/testing/selftests/openat2/openat2_test.c b/tools/testing/selftests/openat2/openat2_test.c
    index b386367c606b..5354cef55c6c 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;
    --
    2.30.2
    \
     
     \ /
      Last update: 2021-09-10 02:57    [W:3.946 / U:0.228 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site