Linux-NFS Archive on lore.kernel.org
 help / Atom feed
* [PATCH] st_getattr: do not expect server to return rdattr_error
@ 2019-02-08 17:18 Tigran Mkrtchyan
  2019-02-14 17:11 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Tigran Mkrtchyan @ 2019-02-08 17:18 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs, Tigran Mkrtchyan

rfc7530:
   5.8.1.12.  Attribute 11: rdattr_error

     Error returned from an attempt to retrieve attributes during a
     READDIR operation.

IOW, we do not expect rdattr_error to be returned in reply to regular
GETATTR operation.

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
---
 nfs4.0/servertests/st_getattr.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nfs4.0/servertests/st_getattr.py b/nfs4.0/servertests/st_getattr.py
index 292fcd2..1c47ebf 100644
--- a/nfs4.0/servertests/st_getattr.py
+++ b/nfs4.0/servertests/st_getattr.py
@@ -1,12 +1,14 @@
 from xdrdef.nfs4_const import *
 from .environment import check
-from nfs4lib import get_attr_name
+from nfs4lib import get_attr_name, get_attrbitnum_dict
 import nfs_ops
 op = nfs_ops.NFS4ops()
 
 def _try_mandatory(t, env, path):
     c = env.c1
     mandatory = [attr.bitnum for attr in env.attr_info if attr.mandatory]
+    # don't expect rdattr_error to be a part of returned attributes
+    mandatory.remove(get_attrbitnum_dict()['rdattr_error'])
     ops = c.use_obj(path)
     ops += [c.getattr(mandatory)]
     res = c.compound(ops)
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] st_getattr: do not expect server to return rdattr_error
  2019-02-08 17:18 [PATCH] st_getattr: do not expect server to return rdattr_error Tigran Mkrtchyan
@ 2019-02-14 17:11 ` J. Bruce Fields
  0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2019-02-14 17:11 UTC (permalink / raw)
  To: Tigran Mkrtchyan; +Cc: linux-nfs

On Fri, Feb 08, 2019 at 06:18:08PM +0100, Tigran Mkrtchyan wrote:
> rfc7530:
>    5.8.1.12.  Attribute 11: rdattr_error
> 
>      Error returned from an attempt to retrieve attributes during a
>      READDIR operation.
> 
> IOW, we do not expect rdattr_error to be returned in reply to regular
> GETATTR operation.

Applied, thanks!

--b.

> 
> Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
> ---
>  nfs4.0/servertests/st_getattr.py | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/nfs4.0/servertests/st_getattr.py b/nfs4.0/servertests/st_getattr.py
> index 292fcd2..1c47ebf 100644
> --- a/nfs4.0/servertests/st_getattr.py
> +++ b/nfs4.0/servertests/st_getattr.py
> @@ -1,12 +1,14 @@
>  from xdrdef.nfs4_const import *
>  from .environment import check
> -from nfs4lib import get_attr_name
> +from nfs4lib import get_attr_name, get_attrbitnum_dict
>  import nfs_ops
>  op = nfs_ops.NFS4ops()
>  
>  def _try_mandatory(t, env, path):
>      c = env.c1
>      mandatory = [attr.bitnum for attr in env.attr_info if attr.mandatory]
> +    # don't expect rdattr_error to be a part of returned attributes
> +    mandatory.remove(get_attrbitnum_dict()['rdattr_error'])
>      ops = c.use_obj(path)
>      ops += [c.getattr(mandatory)]
>      res = c.compound(ops)
> -- 
> 2.20.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-08 17:18 [PATCH] st_getattr: do not expect server to return rdattr_error Tigran Mkrtchyan
2019-02-14 17:11 ` J. Bruce Fields

Linux-NFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nfs/0 linux-nfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nfs linux-nfs/ https://lore.kernel.org/linux-nfs \
		linux-nfs@vger.kernel.org linux-nfs@archiver.kernel.org
	public-inbox-index linux-nfs


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-nfs


AGPL code for this site: git clone https://public-inbox.org/ public-inbox