Linux NFS development
 help / color / mirror / Atom feed
* [PATCH 1/2] Check for None to avoid python exception.
@ 2014-06-23 16:57 Malahal Naineni
  2014-06-23 16:57 ` [PATCH 2/2] Open files with OPEN4_SHARE_DENY_NONE for DELEG5 test Malahal Naineni
  0 siblings, 1 reply; 3+ messages in thread
From: Malahal Naineni @ 2014-06-23 16:57 UTC (permalink / raw)
  To: linux-nfs; +Cc: bfields

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
---
 nfs4.0/servertests/st_delegation.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nfs4.0/servertests/st_delegation.py b/nfs4.0/servertests/st_delegation.py
index 4965f5a..4da3a7a 100644
--- a/nfs4.0/servertests/st_delegation.py
+++ b/nfs4.0/servertests/st_delegation.py
@@ -35,7 +35,7 @@ def _recall(c, op, cbid):
         print "CALLBACK error in _recall:", e
         res = None
     _lock.release()
-    if res.status != NFS4_OK:
+    if res is not None and res.status != NFS4_OK:
         t_error = _handle_error(c, res, ops)
         t = threading.Thread(target=t_error.run)
         t.setDaemon(1)
-- 
1.8.3.1


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

* [PATCH 2/2] Open files with OPEN4_SHARE_DENY_NONE for DELEG5 test
  2014-06-23 16:57 [PATCH 1/2] Check for None to avoid python exception Malahal Naineni
@ 2014-06-23 16:57 ` Malahal Naineni
  2014-07-11 22:20   ` J. Bruce Fields
  0 siblings, 1 reply; 3+ messages in thread
From: Malahal Naineni @ 2014-06-23 16:57 UTC (permalink / raw)
  To: linux-nfs; +Cc: bfields

DELEG5 test, while getting the READ delegation, uses
OPEN4_SHARE_DENY_WRITE as that is the default. Pass
OPEN4_SHARE_DENY_NONE explicitly as that is assumed
in the test.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
---
 nfs4.0/servertests/st_delegation.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nfs4.0/servertests/st_delegation.py b/nfs4.0/servertests/st_delegation.py
index 4da3a7a..eaff326 100644
--- a/nfs4.0/servertests/st_delegation.py
+++ b/nfs4.0/servertests/st_delegation.py
@@ -249,6 +249,7 @@ def testManyReaddeleg(t, env, funct=_recall, response=NFS4_OK):
             
         # Get a read delegation
         res = c.open_file(t.code, access=OPEN4_SHARE_ACCESS_READ,
+                          deny=OPEN4_SHARE_DENY_NONE,
                           set_recall=True,
                           recall_funct=funct, recall_return=response)
         fh, stateid = c.confirm(t.code, res)
-- 
1.8.3.1


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

* Re: [PATCH 2/2] Open files with OPEN4_SHARE_DENY_NONE for DELEG5 test
  2014-06-23 16:57 ` [PATCH 2/2] Open files with OPEN4_SHARE_DENY_NONE for DELEG5 test Malahal Naineni
@ 2014-07-11 22:20   ` J. Bruce Fields
  0 siblings, 0 replies; 3+ messages in thread
From: J. Bruce Fields @ 2014-07-11 22:20 UTC (permalink / raw)
  To: Malahal Naineni; +Cc: linux-nfs

Thanks, applying both.

On Mon, Jun 23, 2014 at 11:57:42AM -0500, Malahal Naineni wrote:
> DELEG5 test, while getting the READ delegation, uses
> OPEN4_SHARE_DENY_WRITE as that is the default.

That's a really dumb default, by the way, we should fix it to default to
DENY_NONE.

--b.

> Pass
> OPEN4_SHARE_DENY_NONE explicitly as that is assumed
> in the test.
> 
> Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
> ---
>  nfs4.0/servertests/st_delegation.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/nfs4.0/servertests/st_delegation.py b/nfs4.0/servertests/st_delegation.py
> index 4da3a7a..eaff326 100644
> --- a/nfs4.0/servertests/st_delegation.py
> +++ b/nfs4.0/servertests/st_delegation.py
> @@ -249,6 +249,7 @@ def testManyReaddeleg(t, env, funct=_recall, response=NFS4_OK):
>              
>          # Get a read delegation
>          res = c.open_file(t.code, access=OPEN4_SHARE_ACCESS_READ,
> +                          deny=OPEN4_SHARE_DENY_NONE,
>                            set_recall=True,
>                            recall_funct=funct, recall_return=response)
>          fh, stateid = c.confirm(t.code, res)
> -- 
> 1.8.3.1
> 

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

end of thread, other threads:[~2014-07-11 22:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-23 16:57 [PATCH 1/2] Check for None to avoid python exception Malahal Naineni
2014-06-23 16:57 ` [PATCH 2/2] Open files with OPEN4_SHARE_DENY_NONE for DELEG5 test Malahal Naineni
2014-07-11 22:20   ` 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