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@xxxxxxxxxxxxxxx > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > > > -- > ---- > thanks > Mi Jinlong > -- 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