linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Mi Jinlong <mijinlong@cn.fujitsu.com>
Cc: NFS <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] CLNT: add some tests for DESTROY_CLIENTID
Date: Thu, 20 Oct 2011 06:02:02 -0400	[thread overview]
Message-ID: <20111020100202.GF5444@fieldses.org> (raw)
In-Reply-To: <4E9FF123.2060704@cn.fujitsu.com>

On Thu, Oct 20, 2011 at 06:00:03PM +0800, Mi Jinlong wrote:
> 
> 
> J. Bruce Fields:
> > There's just one other test I'd suggest: it would be useful to check
> > that the clientid has actually been destroyed.  So, destroy the
> > clientid, then try using it somehow (maybe by sending a create session?
> > Or just trying to use a session that belonged to that client?).
> 
>   I think Case DESCID7 is what you said. 

Whoops, you're right, I missed it.

--b.

>   
> thanks,
> Mi Jinlong
> 
> > 
> > --b.
> > 
> >> +
> >> +    FLAGS: destroy_clientid all
> >> +    CODE: DESCID4
> >> +    """
> >> +    c = env.c1.new_client(env.testname(t))
> >> +    sess = c.create_session()
> >> +
> >> +    res = sess.compound([op.destroy_clientid(c.clientid)])
> >> +    check(res, NFS4ERR_CLIENTID_BUSY)
> >> +
> >> +def testDestroyCIDInSession(t, env):
> >> +    """ destroy a clientid of other session without session
> >> +
> >> +    FLAGS: destroy_clientid all
> >> +    CODE: DESCID5
> >> +    """
> >> +    c = env.c1.new_client(env.testname(t))
> >> +    sess = c.create_session()
> >> +
> >> +    res = env.c1.compound([op.destroy_clientid(c.clientid)])
> >> +    check(res, NFS4ERR_CLIENTID_BUSY)
> >> +
> >> +def testDestroyCIDNotOnly(t, env):
> >> +    """ destroy a clientid without session with other compound
> >> +
> >> +    FLAGS: destroy_clientid all
> >> +    CODE: DESCID6
> >> +    """
> >> +    res = env.c1.compound([op.destroy_clientid(0), op.reclaim_complete(TRUE)])
> >> +    check(res, NFS4ERR_NOT_ONLY_OP)
> >> +
> >> +def testDestroyCIDTwice(t, env):
> >> +    """ destroy a clientid without session twice
> >> +
> >> +    FLAGS: destroy_clientid all
> >> +    CODE: DESCID7
> >> +    """
> >> +    c = env.c1.new_client(env.testname(t))
> >> +
> >> +    res = env.c1.compound([op.destroy_clientid(c.clientid)])
> >> +    check(res)
> >> +
> >> +    res = env.c1.compound([op.destroy_clientid(c.clientid)])
> >> +    check(res, NFS4ERR_STALE_CLIENTID)
> >> -- 
> >> 1.7.6
> >>
> >>
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> > 
> 
> -- 
> ----
> thanks
> Mi Jinlong
> 

  reply	other threads:[~2011-10-20 10:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-20  8:57 [PATCH] CLNT: add some tests for DESTROY_CLIENTID Mi Jinlong
2011-10-20  9:43 ` J. Bruce Fields
2011-10-20 10:00   ` Mi Jinlong
2011-10-20 10:02     ` J. Bruce Fields [this message]
2011-10-20 10:14       ` [PATCH v2] " Mi Jinlong
2011-11-04 22:35         ` 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=20111020100202.GF5444@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=mijinlong@cn.fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).