From patchwork Wed Aug 25 01:49:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 12456207 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE277C4338F for ; Wed, 25 Aug 2021 01:49:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8FA8461248 for ; Wed, 25 Aug 2021 01:49:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbhHYBt5 (ORCPT ); Tue, 24 Aug 2021 21:49:57 -0400 Received: from out30-54.freemail.mail.aliyun.com ([115.124.30.54]:60378 "EHLO out30-54.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229800AbhHYBt5 (ORCPT ); Tue, 24 Aug 2021 21:49:57 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R951e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UlgvsCb_1629856150; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0UlgvsCb_1629856150) by smtp.aliyun-inc.com(127.0.0.1); Wed, 25 Aug 2021 09:49:11 +0800 From: Baolin Wang To: shuah@kernel.org Cc: cyphar@cyphar.com, christian.brauner@ubuntu.com, baolin.wang@linux.alibaba.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] selftests: openat2: Fix testing failure for O_LARGEFILE flag Date: Wed, 25 Aug 2021 09:49:04 +0800 Message-Id: X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org When running the openat2 test suite on ARM64 platform, we got below failure, since the definition of the O_LARGEFILE is different on ARM64. So we can set the correct O_LARGEFILE definition on ARM64 to fix this issue. "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)" Signed-off-by: Baolin Wang Reviewed-by: Aleksa Sarai Acked-by: Christian Brauner --- Changes from v1: - Add reviewed and acked tags from Aleksa and Christian. - Add failure logs in the commit log. --- 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 d7ec1e7..1bddbe9 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;