Re: [PATCH 3/3] nfsd4: implement secinfo_no_name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 05, 2011 at 10:15:11AM -0500, Fred Isaman wrote:
> On Tue, Jan 4, 2011 at 8:05 PM, J. Bruce Fields <bfields@xxxxxxxxxxxx> wrote:
> > On Thu, Dec 30, 2010 at 12:13:27PM +0800, Mi Jinlong wrote:
> >>
> >>
> >> J. Bruce Fields:
> >> > On Mon, Dec 27, 2010 at 02:29:57PM +0800, Mi Jinlong wrote:
> >> >> When testing this patch, oops appears.
> >> >>
> >> >> We should implement a nfsd4_encode_secinfo_no_name() instead using
> >> >> nfsd4_encode_secinfo().
> >> >>
> >> >> With the following patch, kernel will run correctly.
> >> >
> >> > Whoops, yes, you're correct. ÂI've applied your patch. ÂThanks!
> >> >
> >> > (What are you using for testing?)
> >>
> >> Hi Bruce:
> >>
> >> Â I test it by the pynfs41 at your tree, and add some simple
> >> Â test case as following.
> >>
> >> Â I have a question about the op.secinfo_no_name(), should it take
> >> Â a argument?
> >> Â Right now, maybe it always request with NFS4_SECINFO_STYLE4_CURRENT_FH,
> >> Â or I can't find how to set the argument.
> >
> 
> There was a bug in how the op.secinfo_no_name() function was auto
> constructed.  I've pushed a fix to
> my tree at git://linux-nfs.org/~iisaman/newpynfs.git.

Thanks, Fred.  I've pulled that into my repository too.

--b.

> 
> Fred
> 
> > Hm, I don't know, I guess I'd look at how arguments are passed to some
> > of the other operations when constructing compounds in other tests....
> >
> > --b.
> >
> >>
> >> thanks,
> >> Mi Jinlong
> >>
> >> >From 31ae25c04295888fa54ea531cdfaa4cfdefbe877 Mon Sep 17 00:00:00 2001
> >> From: Mi Jinlong <mijinlong@xxxxxxxxxxxxxx>
> >> Date: Wed, 29 Dec 2010 17:23:35 +0800
> >> Subject: [PATCH] CLNT: Add some simple secinfo_no_name tests
> >>
> >> ÂAdd two simple secinfo_no_name tests as Bruce said:
> >> Â Â - send PUTROOTFH+SECINFO_NO_NAME, check that you get back a
> >> Â Â Â legal result.
> >> Â Â - send PUTROOTFH+SECINFO+GETFH, and/or
> >> Â Â Â PUTROOTFH+SECINFO_NO_NAME+GETFH, check that the GETFH returns
> >> Â Â Â NOFILEHANDLE.
> >>
> >> ÂSigned-off-by: Mi Jinlong <mijinlong@xxxxxxxxxxxxxx>
> >> ---
> >> Ânfs4.1/server41tests/__init__.py      |  Â1 +
> >> Ânfs4.1/server41tests/st_secinfo_no_name.py | Â 35 ++++++++++++++++++++++++++++
> >> Â2 files changed, 36 insertions(+), 0 deletions(-)
> >> Âcreate mode 100644 nfs4.1/server41tests/st_secinfo_no_name.py
> >>
> >> 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..a4b148d
> >> --- /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()])
> >> + Â Â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(), op.getfh()])
> >> + Â Âprint res
> >> + Â Âcheck(res, NFS4ERR_NOFILEHANDLE);
> >> +
> >> + Â Âres = sess.compound([op.putrootfh(), op.secinfo("tree"), op.getfh()])
> >> + Â Âprint res
> >> + Â Âcheck(res, NFS4ERR_NOFILEHANDLE);
> >> --
> >> 1.7.3.3
> >>
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux