* [PATCH] Fail the test if number of supported attrs are more than expected.
@ 2014-08-14 5:32 Srikrishan Malik
2014-10-07 13:46 ` J. Bruce Fields
0 siblings, 1 reply; 2+ messages in thread
From: Srikrishan Malik @ 2014-08-14 5:32 UTC (permalink / raw)
To: bfields; +Cc: linux-nfs, Srikrishan Malik
Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
---
nfs4.0/servertests/st_getattr.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/nfs4.0/servertests/st_getattr.py b/nfs4.0/servertests/st_getattr.py
index a55b923..6a4acdd 100644
--- a/nfs4.0/servertests/st_getattr.py
+++ b/nfs4.0/servertests/st_getattr.py
@@ -43,10 +43,14 @@ def _try_empty(t, c, path):
def _try_supported(t, env, path):
c = env.c1
mandatory = sum([attr.mask for attr in env.attr_info if attr.mandatory])
+ all = sum([attr.mask for attr in env.attr_info])
supported = c.supportedAttrs(path)
if mandatory & supported != mandatory:
t.fail("GETATTR(FATTR4_SUPPORTED_ATTRS) did not return "
"all mandatory attributes")
+ if supported > all:
+ t.fail("GETATTR(FATTR4_SUPPORTED_ATTRS) returned more than expected "
+ "supported attributes for the protocol")
def _try_long(env, path):
c = env.c1
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fail the test if number of supported attrs are more than expected.
2014-08-14 5:32 [PATCH] Fail the test if number of supported attrs are more than expected Srikrishan Malik
@ 2014-10-07 13:46 ` J. Bruce Fields
0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2014-10-07 13:46 UTC (permalink / raw)
To: Srikrishan Malik; +Cc: bfields, linux-nfs
Sorry for the delay.
Returning unrequested attributes sounds like unlikely behavior, but may
as well check for it, sure.... Applying.
--b.
On Thu, Aug 14, 2014 at 11:02:26AM +0530, Srikrishan Malik wrote:
> Signed-off-by: Srikrishan Malik <srimalik@in.ibm.com>
> ---
> nfs4.0/servertests/st_getattr.py | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/nfs4.0/servertests/st_getattr.py b/nfs4.0/servertests/st_getattr.py
> index a55b923..6a4acdd 100644
> --- a/nfs4.0/servertests/st_getattr.py
> +++ b/nfs4.0/servertests/st_getattr.py
> @@ -43,10 +43,14 @@ def _try_empty(t, c, path):
> def _try_supported(t, env, path):
> c = env.c1
> mandatory = sum([attr.mask for attr in env.attr_info if attr.mandatory])
> + all = sum([attr.mask for attr in env.attr_info])
> supported = c.supportedAttrs(path)
> if mandatory & supported != mandatory:
> t.fail("GETATTR(FATTR4_SUPPORTED_ATTRS) did not return "
> "all mandatory attributes")
> + if supported > all:
> + t.fail("GETATTR(FATTR4_SUPPORTED_ATTRS) returned more than expected "
> + "supported attributes for the protocol")
>
> def _try_long(env, path):
> c = env.c1
> --
> 1.7.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-07 13:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-14 5:32 [PATCH] Fail the test if number of supported attrs are more than expected Srikrishan Malik
2014-10-07 13:46 ` J. Bruce Fields
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox