Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2445374pxb; Mon, 23 Aug 2021 22:26:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeDgEFbXz5zM/RalMEvUZGBZ18NTiV5SlYBVQS1B1AWtoWjbxtTLiDafWfkeU/rZfY8ezH X-Received: by 2002:a5e:da44:: with SMTP id o4mr4066295iop.147.1629782786246; Mon, 23 Aug 2021 22:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629782786; cv=none; d=google.com; s=arc-20160816; b=BVitypzKup7BxKQpBVbbXIU1l4BdBHj8GlpB77jATAgI5SDwKJbrPd1ia95+yUGAlg N6NaKUrL+yBw+WSMIgaKLX96KWdMGuNgCctYMQ+/1IG5KZUerqVW4N577PdQ/+Xg1K0Y fXlqsuDUh9Wb34U4FmcwIL1tik1MQNBOhnAc40xBB6KggywjsFO5AgyoNzlYQEfoeaon pcG4ttYR4c9+UXQt847HiaanQCaJbzCOqsSEU3atcForAPwE04oEZY6m+upnLfnMeZdb XKOTsH+epsrtDj+NxyTBwQp7vrDqeKi3CBmlLH6qyl9Q7ngWoPy3rDbW1RcxjnG+E9nm hqvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=QU+FgahOLcYYBNrIRhsP30O1Vo6l70zvOlZvqsHiLVU=; b=BZd+2jiEpLBBwXlWsswedG+nvZWSDjro3Gx2NGb8Gop7HTFyXkM/z1JThbQr2kVY5o aQF8ycCqIiPvBe7lplV7NxQbF4kWYsPY0vbpt6W4p50k7Li+dzvBh2quf+gvkKLcrQRn srZMzv8PrZGs63i/50nqvCU8PDEy9sIjRiM2qr9U1AM9lTfKonYVghJAyYjzwDoGsLtD wrUt2nKs6ybda5uMFzMiHJaABk+QVJgo7XYYKI85tKiuba7YA9F5A9ewH5XX48GtHyyP cruRZvDFhIYPC7njB4CfDnGRbyfH/q95r479N9nmFOju+Qm7YHGGJTEG2Lg1TMgkTOcY GM3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r10si16944766jap.64.2021.08.23.22.26.14; Mon, 23 Aug 2021 22:26:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230497AbhHXF0T (ORCPT + 99 others); Tue, 24 Aug 2021 01:26:19 -0400 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:54687 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229885AbhHXF0Q (ORCPT ); Tue, 24 Aug 2021 01:26:16 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R481e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UlTKbvp_1629782729; Received: from 30.21.164.109(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0UlTKbvp_1629782729) by smtp.aliyun-inc.com(127.0.0.1); Tue, 24 Aug 2021 13:25:29 +0800 Subject: Re: [PATCH] selftests: openat2: Fix testing failure for O_LARGEFILE flag To: Shuah Khan , shuah@kernel.org, Christian Brauner , Aleksa Sarai Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org References: <1627475340-128057-1-git-send-email-baolin.wang@linux.alibaba.com> <01184d9e-477d-cbe4-c936-62b92e915911@linux.alibaba.com> <9411d418-567b-78f0-0e4d-30f08371c55a@linux.alibaba.com> From: Baolin Wang Message-ID: <4b7f320a-53d0-982a-b441-60e2ce86bfae@linux.alibaba.com> Date: Tue, 24 Aug 2021 13:26:00 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shuah, On 2021/8/24 3:23, Shuah Khan wrote: > Hi Baolin, > > On 8/22/21 8:40 PM, Baolin Wang wrote: >> Hi Shuah, >> >> On 2021/7/28 20:32, Baolin Wang wrote: >>> Hi, >>> >>>> 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. >>> >>> Sorry, I forgot to copy the failure log: >>> > > Please cc everybody get_maintainers.pl suggests. You are missing > key reviewers for this change. > > Adding Christian Brauner and Aleksa Sarai to the thread. Thanks. > >>> # openat2 unexpectedly returned # >>> 3['/lkp/benchmarks/kernel_selftests/tools/testing/selftests/openat2'] >>> with 208000 (!= 208000) > > Not sure I understand this. 208000 (!= 208000) look sthe same to me. These are not the error message, just show the fd flags. The error is it should return -22 (-EINVAL) for this test case, but it returns 3 which indicates a successful openat2() calling. >>> not ok 102 openat2 with incompatible flags (O_PATH | O_LARGEFILE) >>> fails with -22 (Invalid argument) >>> >>>> >>>> Signed-off-by: Baolin Wang >> >> Could you apply this patch if no objection from your side? Thanks. >> > > Ideally this define should come from an include file. > > Christian, Aleksa, > > Can you review this patch and let me know if this approach looks right. > >>>> --- >>>>   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; >>>> >> > > thanks, > -- Shuah