All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pynfs: fix result array access in CSID7
@ 2018-11-26 16:08 Tigran Mkrtchyan
  2018-11-27 20:14 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Tigran Mkrtchyan @ 2018-11-26 16:08 UTC (permalink / raw)
  To: bfields; +Cc: loghyr, linux-nfs, Tigran Mkrtchyan

fixes 6612354e

the result array look like

..., OPEN, GETFH, LAYOUTGET]
thus fh in -2, open stateid in -3

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
---
 nfs4.1/server41tests/st_current_stateid.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nfs4.1/server41tests/st_current_stateid.py b/nfs4.1/server41tests/st_current_stateid.py
index 58f6e9b..a6671eb 100644
--- a/nfs4.1/server41tests/st_current_stateid.py
+++ b/nfs4.1/server41tests/st_current_stateid.py
@@ -147,12 +147,12 @@ def testOpenLayoutGet(t, env):
     sess = env.c1.new_pnfs_client_session(env.testname(t))
 
     open_op = open_create_file_op(sess, env.testname(t), open_create=OPEN4_CREATE)
-    res = sess.compound( open_op + 
+    res = sess.compound( open_op +
            [op.layoutget(False, LAYOUT4_NFSV4_1_FILES, LAYOUTIOMODE4_RW,
                         0, 8192, 8192, current_stateid, 0xffff)])
     check(res, NFS4_OK)
-    fh = res.resarray[-1].object
-    stateid = res.resarray[-2].stateid
+    fh = res.resarray[-2].object
+    stateid = res.resarray[-3].stateid
     res = close_file(sess, fh, stateid=stateid)
     check(res)
 
-- 
2.19.1


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

* Re: [PATCH] pynfs: fix result array access in CSID7
  2018-11-26 16:08 [PATCH] pynfs: fix result array access in CSID7 Tigran Mkrtchyan
@ 2018-11-27 20:14 ` J. Bruce Fields
  0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2018-11-27 20:14 UTC (permalink / raw)
  To: Tigran Mkrtchyan; +Cc: loghyr, linux-nfs

On Mon, Nov 26, 2018 at 05:08:27PM +0100, Tigran Mkrtchyan wrote:
> fixes 6612354e
> 
> the result array look like

Thanks, applied.--b.

> 
> ..., OPEN, GETFH, LAYOUTGET]
> thus fh in -2, open stateid in -3
> 
> Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
> ---
>  nfs4.1/server41tests/st_current_stateid.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/nfs4.1/server41tests/st_current_stateid.py b/nfs4.1/server41tests/st_current_stateid.py
> index 58f6e9b..a6671eb 100644
> --- a/nfs4.1/server41tests/st_current_stateid.py
> +++ b/nfs4.1/server41tests/st_current_stateid.py
> @@ -147,12 +147,12 @@ def testOpenLayoutGet(t, env):
>      sess = env.c1.new_pnfs_client_session(env.testname(t))
>  
>      open_op = open_create_file_op(sess, env.testname(t), open_create=OPEN4_CREATE)
> -    res = sess.compound( open_op + 
> +    res = sess.compound( open_op +
>             [op.layoutget(False, LAYOUT4_NFSV4_1_FILES, LAYOUTIOMODE4_RW,
>                          0, 8192, 8192, current_stateid, 0xffff)])
>      check(res, NFS4_OK)
> -    fh = res.resarray[-1].object
> -    stateid = res.resarray[-2].stateid
> +    fh = res.resarray[-2].object
> +    stateid = res.resarray[-3].stateid
>      res = close_file(sess, fh, stateid=stateid)
>      check(res)
>  
> -- 
> 2.19.1

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

end of thread, other threads:[~2018-11-27 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-26 16:08 [PATCH] pynfs: fix result array access in CSID7 Tigran Mkrtchyan
2018-11-27 20:14 ` J. Bruce Fields

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.