diff mbox

[04/17] CLNT: test with ca_maxresponsesize is too small

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

Commit Message

Mi Jinlong March 2, 2011, 6:29 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 4185aa8..1b8b119 100644
--- a/nfs4.1/server41tests/st_create_session.py
+++ b/nfs4.1/server41tests/st_create_session.py
@@ -411,3 +411,19 @@  def testCsr_sequence(t, env):
     sess1 = c.create_session(fore_attrs=chan_attrs)
     if not nfs4lib.test_equal(sess1.seqid, csa_sequence, "int"):
         fail("Server returns bad csr_sequence which not equal to csa_sequence")
+
+def testTooSmallMaxRS(t, env):
+    """If client selects a value for ca_maxresponsesize such that
+       a replier on a channel could never send a response,
+       server SHOULD return NFS4ERR_TOOSMALL
+
+    FLAGS: create_session all
+    CODE: CSESS25
+    """
+    c = env.c1.new_client(env.testname(t))
+    # CREATE_SESSION with too small ca_maxresponsesize
+    chan_attrs = channel_attrs4(0,8192,0,8192,128,8,[])
+    res = c.c.compound([op.create_session(c.clientid, c.seqid, 0,
+                                        chan_attrs, chan_attrs,
+                                        123, [])], None)
+    check(res, NFS4ERR_TOOSMALL)