Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1628755rwb; Sun, 14 Aug 2022 08:16:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR7zljMzcNl2+YJYzxMDOgOMnqpxVhEI+bjp8OciVCXOje+RJndlVcn5mnnUerez5YSrm8qt X-Received: by 2002:a63:1e61:0:b0:41c:45d:7d50 with SMTP id p33-20020a631e61000000b0041c045d7d50mr10069854pgm.507.1660490202445; Sun, 14 Aug 2022 08:16:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660490202; cv=none; d=google.com; s=arc-20160816; b=iMwtpI0ZGElNoRjaMOdWZvu5nTZXNFOFs+XmmFWdO6kXIix47pS4H+h5Jm8wF35id+ DMZiR2QGEbxOpjX8ThB6Ksh6Y44/9STdQvgtVPtBqV/dMeCNWuHnE9GSYvXVENi9h8K2 3teMMZjQa+z8YrvMgQzXERM6it60Iw7ZpWXO3C/Vt+MGgRRhYwfSiY4xzk9adxa+jKcs +fNsUAhD1V1N1r7cO8+F/Vboo2uysQhnZ+T3urmZdglw9V8LTZURUFHxzjLKK/DXQ46l a+vD53litCOKQXAJcrqeZpYf9FuWKXIR0Q70VzfLeczL0Pw5Jf0MaQAcgdr2bk5k5+lx o6ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:from:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date :dkim-signature:dkim-filter; bh=EKRv2Vt7hnkHgV8MtxOm+AbeEDQhm+txZHOHevHcxoQ=; b=ACzQtwmag5WO61Roz+OhaW2YbiAECTuTjRNe8U0pgqpKPs7JGobwBGW+M2IlFlAfAM udBW/396AxDK7MBcv8WV5fHp5D2HhT9CfS6OwN53a5B6dvRfehSTeF6qfaHvGWWnrNgn qyVAT/4vdi/KsKahcMbUkn6GqW9YJOc/lGrSg3ghtPyhUqkZYhYoBiBDrAsMlLiOnNW4 /hfXvRxs/FIQupwoctlL5+OL8Uk0N13F6t/YLWbY4lNtoX6eeYcfgOUBltiUubv6W/Zg AG6ZUZqAQNw9d9MxoLnepxTAEUg/PjLSGQ1YFaUyXyoJWjIxBDV6NQEUazty1NoVVsRz wYkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=WH5rgj2P; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fieldses.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e8-20020a636908000000b00410ac395252si7709600pgc.512.2022.08.14.08.16.15; Sun, 14 Aug 2022 08:16:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=WH5rgj2P; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fieldses.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229558AbiHNO4V (ORCPT + 99 others); Sun, 14 Aug 2022 10:56:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230088AbiHNO4V (ORCPT ); Sun, 14 Aug 2022 10:56:21 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04EBA175B6 for ; Sun, 14 Aug 2022 07:56:19 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id B25B225FE; Sun, 14 Aug 2022 10:56:18 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org B25B225FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1660488978; bh=EKRv2Vt7hnkHgV8MtxOm+AbeEDQhm+txZHOHevHcxoQ=; h=Date:To:Cc:Subject:References:In-Reply-To:From:From; b=WH5rgj2PO2sQTodh5NucA3Bzpqb8h/3WEX72TrbuSzvNdirQxu2IjmMYmYccKOhB6 liK/ljN0Bdg75UXmeCqjzWG7K2LbMnMogoIqAhs5TLECnCmuzbJtDsbU9pLR3tUX7b 4u/3y/PSiX/AlR2afFyXWlwnP6+joIeazhoKicrI= Date: Sun, 14 Aug 2022 10:56:18 -0400 To: Chuck Lever III Cc: Linux NFS Mailing List Subject: Re: [PATCH] DELEG5: Create test file with mode o666 Message-ID: <20220814145618.GA5578@fieldses.org> References: <166031330113.3080139.1273532571655274363.stgit@morisot.1015granger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) From: bfields@fieldses.org (J. Bruce Fields) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Thanks, updated the changelog and applied.--b. On Fri, Aug 12, 2022 at 07:12:42PM +0000, Chuck Lever III wrote: > > > > On Aug 12, 2022, at 10:08 AM, Chuck Lever wrote: > > > > DELEG5 st_delegation.testManyReaddeleg : FAILURE > > Open which causes recall should return NFS4_OK or > > NFS4ERR_DELAY, instead got NFS4ERR_ACCESS > > ******* CB_Recall (id=14)******** > > ************************************************** > > Command line asked for 1 of 678 tests > > Of those: 0 Skipped, 1 Failed, 0 Warned, 0 Passed > > > > WARNING: could not clean testdir due to: > > Making sure b'DELEG5-1' is writable: operation OP_SETATTR should return NFS4_OK, instead got NFS4ERR_DELAY > > > > DELEG5 attempts an OPEN with ACCESS_WRITE to force the recall of > > a bunch of delegations. The OPEN that requests ACCESS_WRITE fails, > > however, because the test file was created as 0,0 with mode o644. > > This paragraph could be more clear: > > DELEG5 creates the test file as UID 0 with mode rw-r--r-- > > The later OPEN for Write (to trigger delegation recall) is sent as UID 1. > This OPEN fails because mode rw-r--r-- does not permit UID 1 to open a file > owned by UID 0 for write. > > > > A perhaps more preferable long-term fix would be to follow the > > advice of the nearby comment and convert DELEG5 to use _get_deleg(), > > but I'm not expert enough to tackle that yet. > > _get_deleg() creates its test file as UID0 with mode rw-rw-rw-, > thus side-stepping the subsequent permission conflict. My proposed > fix simply copies that behavior to DELEG5. > > > > Signed-off-by: Chuck Lever > > --- > > nfs4.0/servertests/st_delegation.py | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/nfs4.0/servertests/st_delegation.py b/nfs4.0/servertests/st_delegation.py > > index 9c98ec0e0fb3..ba49cf9f09db 100644 > > --- a/nfs4.0/servertests/st_delegation.py > > +++ b/nfs4.0/servertests/st_delegation.py > > @@ -244,7 +244,8 @@ def testManyReaddeleg(t, env, funct=_recall, response=NFS4_OK): > > c.init_connection(b'pynfs%i_%s' % (os.getpid(), t.word()), cb_ident=0) > > cbids = [] > > fh, stateid = c.create_confirm(t.word(), access=OPEN4_SHARE_ACCESS_READ, > > - deny=OPEN4_SHARE_DENY_NONE) > > + deny=OPEN4_SHARE_DENY_NONE, > > + attrs={FATTR4_MODE: 0o666}) > > for i in range(count): > > c.init_connection(b'pynfs%i_%s_%i' % (os.getpid(), t.word(), i), cb_ident=0) > > fh, stateid = c.open_confirm(t.word(), access=OPEN4_SHARE_ACCESS_READ, > > > > > > -- > Chuck Lever > >