From patchwork Tue Mar 22 09:44:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mi Jinlong X-Patchwork-Id: 652111 X-Patchwork-Delegate: Trond.Myklebust@netapp.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2M9hLWb011067 for ; Tue, 22 Mar 2011 09:43:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753458Ab1CVJnU (ORCPT ); Tue, 22 Mar 2011 05:43:20 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:51051 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752922Ab1CVJnT (ORCPT ); Tue, 22 Mar 2011 05:43:19 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 90A50170091; Tue, 22 Mar 2011 17:43:16 +0800 (CST) Received: from mailserver.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id p2M9bAks001252; Tue, 22 Mar 2011 17:37:10 +0800 Received: from [127.0.0.1] ([10.167.225.24]) by mailserver.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.1FP4) with ESMTP id 2011032217414926-77754 ; Tue, 22 Mar 2011 17:41:49 +0800 Message-ID: <4D886F71.8050001@cn.fujitsu.com> Date: Tue, 22 Mar 2011 17:44:17 +0800 From: Mi Jinlong User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: "J. Bruce Fields" CC: NFS Subject: Re: [PATCH 10/17] CLNT: test resues slot ID References: <4D6DE26C.3010103@cn.fujitsu.com> <4D6DE4A5.1050702@cn.fujitsu.com> <20110303061442.GE7724@fieldses.org> <4D6F5B4E.7000903@cn.fujitsu.com> <4D70AB97.3070502@cn.fujitsu.com> <20110314184144.GB25442@fieldses.org> <20110314192434.GC25442@fieldses.org> <4D7ED324.4070600@cn.fujitsu.com> <20110317225245.GE31845@fieldses.org> In-Reply-To: <20110317225245.GE31845@fieldses.org> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2011-03-22 17:41:49, Serialize by Router on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2011-03-22 17:41:52, Serialize complete at 2011-03-22 17:41:52 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 22 Mar 2011 09:43:22 +0000 (UTC) diff --git a/nfs4.1/server41tests/st_sequence.py b/nfs4.1/server41tests/st_sequence.py index c11fdc9..7277290 100644 --- a/nfs4.1/server41tests/st_sequence.py +++ b/nfs4.1/server41tests/st_sequence.py @@ -363,3 +363,32 @@ def testBadSequenceidAtSlot(t, env): res = c.c.compound([op.sequence(sid, nfs4lib.dec_u32(seqid), 2, 3, True)]) check(res, NFS4ERR_SEQ_MISORDERED) + +def testReuseSlotID(t, env): + """ If client reuses a slot ID and sequence ID for a completely + different request, server MAY treat the request as if it is + a retry of what it has already executed. rfc5661 18.46.3 + + FLAGS: sequence all + CODE: SEQ14 + """ + c = env.c1.new_client(env.testname(t)) + # CREATE_SESSION + sess1 = c.create_session() + + name = "%s_1" % env.testname(t) + res = create_file(sess1, name) + check(res) + + sid = sess1.sessionid + seqid = nfs4lib.inc_u32(sess1.seqid) + dir = sess1.c.homedir + + res = c.c.compound([op.sequence(sid, seqid, 0, 0, TRUE)] + + nfs4lib.use_obj(dir) + [op.remove(name)]) + check(res) + + # Reuses slot ID and sequence ID for different request + res = c.c.compound([op.sequence(sid, seqid, 0, 0, TRUE)] + + nfs4lib.use_obj(dir) + [op.rename(name, "test")]) + check(res)