All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
To: bfields@fieldses.org
Cc: loghyr@gmail.com, linux-nfs@vger.kernel.org,
	Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Subject: [PATCH] pynfs: fix result array access in CSID7
Date: Mon, 26 Nov 2018 17:08:27 +0100	[thread overview]
Message-ID: <20181126160827.153240-1-tigran.mkrtchyan@desy.de> (raw)

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


             reply	other threads:[~2018-11-26 16:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-26 16:08 Tigran Mkrtchyan [this message]
2018-11-27 20:14 ` [PATCH] pynfs: fix result array access in CSID7 J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181126160827.153240-1-tigran.mkrtchyan@desy.de \
    --to=tigran.mkrtchyan@desy.de \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=loghyr@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.