diff mbox

[01/17] CLNT: check NFS4ERR_NOT_ONLY_OP for CREATE_SESSION

Message ID 4D6DE2F8.8010309@cn.fujitsu.com (mailing list archive)
State RFC, archived
Headers show

Commit Message

Mi Jinlong March 2, 2011, 6:26 a.m. UTC
None
diff mbox

Patch

diff --git a/nfs4.1/server41tests/st_create_session.py b/nfs4.1/server41tests/st_create_session.py
index a213a3c..1d02a50 100644
--- a/nfs4.1/server41tests/st_create_session.py
+++ b/nfs4.1/server41tests/st_create_session.py
@@ -382,3 +382,17 @@  def testMaxreqs(t, env):
     if nfs4lib.test_equal(sess1.fore_channel.maxrequests,
                           chan_attrs.ca_maxrequests, "count4"):
         fail("Server allows surprisingly large fore_channel maxreqs")
+
+def testNotOnlyOp(t, env):
+    """Check for NFS4ERR_NOT_ONLY_OP
+
+    FLAGS: create_session all
+    CODE: CSESS23
+    """
+    c = env.c1.new_client(env.testname(t))
+    # CREATE_SESSION with PUT_ROOTFH
+    chan_attrs = channel_attrs4(0,8192,8192,8192,128,8,[])
+    res = c.c.compound([op.create_session(c.clientid, c.seqid, 0,
+                                        chan_attrs, chan_attrs,
+                                        123, []), op.putrootfh()], None)
+    check(res, NFS4ERR_NOT_ONLY_OP)