From patchwork Thu Jan 6 03:54:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mi Jinlong X-Patchwork-Id: 457741 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 p063isww007578 for ; Thu, 6 Jan 2011 03:49:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754822Ab1AFDtG (ORCPT ); Wed, 5 Jan 2011 22:49:06 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:49471 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1754774Ab1AFDtG convert rfc822-to-8bit (ORCPT ); Wed, 5 Jan 2011 22:49:06 -0500 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 021D3170916; Thu, 6 Jan 2011 11:49:03 +0800 (CST) Received: from mailserver.fnst.cn.fujitus.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id p063huDf022982; Thu, 6 Jan 2011 11:43:57 +0800 Received: from [127.0.0.1] ([10.167.225.24]) by mailserver.fnst.cn.fujitus.com (Lotus Domino Release 8.5.1FP4) with ESMTP id 2011010611484272-105934 ; Thu, 6 Jan 2011 11:48:42 +0800 Message-ID: <4D253CDA.30605@cn.fujitsu.com> Date: Thu, 06 Jan 2011 11:54:02 +0800 From: Mi Jinlong User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: "J. Bruce Fields" CC: Fred Isaman , "J. Bruce Fields" , linux-nfs@vger.kernel.org Subject: Re: [PATCH 3/3] nfsd4: implement secinfo_no_name References: <1292612511-14203-1-git-send-email-bfields@redhat.com> <1292612511-14203-4-git-send-email-bfields@redhat.com> <4D183265.70608@cn.fujitsu.com> <20101229185609.GA12218@fieldses.org> <4D1C06E7.5060009@cn.fujitsu.com> <20110105010507.GC14744@fieldses.org> <20110105153713.GA13000@fieldses.org> <20110105172916.GD13000@fieldses.org> In-Reply-To: <20110105172916.GD13000@fieldses.org> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2011-01-06 11:48:42, Serialize by Router on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2011-01-06 11:48:43 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.3 (demeter1.kernel.org [140.211.167.41]); Thu, 06 Jan 2011 03:49:09 +0000 (UTC) diff --git a/nfs4.1/server41tests/__init__.py b/nfs4.1/server41tests/__init__.py index 22cd664..6aee88e 100644 --- a/nfs4.1/server41tests/__init__.py +++ b/nfs4.1/server41tests/__init__.py @@ -2,6 +2,7 @@ __all__ = ["st_exchange_id.py", # draft 21 "st_compound.py", "st_create_session.py", "st_destroy_session.py", + "st_secinfo_no_name.py", "st_sequence.py", "st_trunking.py", "st_open.py", diff --git a/nfs4.1/server41tests/st_secinfo_no_name.py b/nfs4.1/server41tests/st_secinfo_no_name.py new file mode 100644 index 0000000..b66fdb6 --- /dev/null +++ b/nfs4.1/server41tests/st_secinfo_no_name.py @@ -0,0 +1,35 @@ +from st_create_session import create_session +from nfs4_const import * +from environment import check, fail, bad_sessionid, create_file +from nfs4_type import channel_attrs4 +import nfs4_ops as op +import nfs4lib + +def testSupported(t, env): + """Do a simple SECINFO_NO_NAME + send PUTROOTFH+SECINFO_NO_NAME, check is result legal + + FLAGS: all + CODE: SECNN1 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name(0)]) + check(res); + +def testSupported2(t, env): + """GETFH after do a SECINFO_NO_NAME or SECINFO + result in a NOFILEHANDLE error, See rfc 5661 section 2.6.3.1.1.8 + + FLAGS: all + CODE: SECNN2 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name(0), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE); + + res = sess.compound([op.putrootfh(), op.secinfo("tree"), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE);