From patchwork Mon Nov 26 16:08:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mkrtchyan, Tigran" X-Patchwork-Id: 10698583 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2211813AD for ; Mon, 26 Nov 2018 16:08:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 129B4296FB for ; Mon, 26 Nov 2018 16:08:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0646929733; Mon, 26 Nov 2018 16:08:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HK_RANDOM_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE9A9296FB for ; Mon, 26 Nov 2018 16:08:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726253AbeK0DDM (ORCPT ); Mon, 26 Nov 2018 22:03:12 -0500 Received: from smtp-o-3.desy.de ([131.169.56.156]:38916 "EHLO smtp-o-3.desy.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726224AbeK0DDM (ORCPT ); Mon, 26 Nov 2018 22:03:12 -0500 Received: from smtp-buf-3.desy.de (smtp-buf-3.desy.de [131.169.56.166]) by smtp-o-3.desy.de (DESY-O-3) with ESMTP id 9899E280713 for ; Mon, 26 Nov 2018 17:08:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp-o-3.desy.de 9899E280713 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=desy.de; s=default; t=1543248517; bh=SoqRGdo+UM40UcRuCoSVPjRFe+cZNRkDPkt2HdgoSNg=; h=From:To:Cc:Subject:Date:From; b=Nl8xgchFhCuUx/tNTC3JmXzAu9T8gDX2rp9szWLdSqi2t4XvE18Ju+ltU+tvP8Fnv iVT6+/hhmIhTnyBP6649E3EuOlEkeaYFn0EqZMvgdEpduiKGYZ2vpi01D1Bbbjn9j3 cIyUGo62yKqoh2OyqWDpY6ZfkVBg+t1WL2imyzTg= Received: from smtp-m-3.desy.de (smtp-m-3.desy.de [IPv6:2001:638:700:1038::1:83]) by smtp-buf-3.desy.de (Postfix) with ESMTP id 92660A019A; Mon, 26 Nov 2018 17:08:37 +0100 (CET) X-Virus-Scanned: amavisd-new at desy.de Received: from ani.desy.de (zitpcx21033.desy.de [131.169.185.213]) by smtp-intra-1.desy.de (DESY-INTRA-1) with ESMTP id 5F4A43E901; Mon, 26 Nov 2018 17:08:37 +0100 (MET) From: Tigran Mkrtchyan To: bfields@fieldses.org Cc: loghyr@gmail.com, linux-nfs@vger.kernel.org, Tigran Mkrtchyan Subject: [PATCH] pynfs: fix result array access in CSID7 Date: Mon, 26 Nov 2018 17:08:27 +0100 Message-Id: <20181126160827.153240-1-tigran.mkrtchyan@desy.de> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP fixes 6612354e the result array look like ..., OPEN, GETFH, LAYOUTGET] thus fh in -2, open stateid in -3 Signed-off-by: Tigran Mkrtchyan --- 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)