[PATCH 06/17] CLNT: test reply too big to cache

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

 



Signed-off-by: Mi Jinlong <mijinlong@xxxxxxxxxxxxxx>
---
 nfs4.1/server41tests/st_create_session.py |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/nfs4.1/server41tests/st_create_session.py b/nfs4.1/server41tests/st_create_session.py
index c474ce3..ff55d10 100644
--- a/nfs4.1/server41tests/st_create_session.py
+++ b/nfs4.1/server41tests/st_create_session.py
@@ -455,3 +455,24 @@ def testRepTooBig(t, env):
     # read data rather than ca_maxresponsesize
     res = sess1.compound([op.putfh(fh), op.read(stateid, 0, 500)])
     check(res, NFS4ERR_REP_TOO_BIG)
+
+def testRepTooBigToCache(t, env):
+    """If requester sends a request for which the size of the reply
+       would exceed ca_maxresponsesize_cached, the replier will return
+       NFS4ERR_REP_TOO_BIG_TO_CACHE
+
+    FLAGS: create_session all
+    CODE: CSESS27
+    """
+    c = env.c1.new_client(env.testname(t))
+    # CREATE_SESSION with a small ca_maxresponsesize_cached
+    chan_attrs = channel_attrs4(0,8192,8192,10,128,8,[])
+    res = c.c.compound([op.create_session(c.clientid, c.seqid, 0,
+                                        chan_attrs, chan_attrs,
+                                        123, [])], None)
+    check(res)
+
+    # SEQUENCE with cache this
+    sid = res.resarray[0].csr_sessionid
+    res = c.c.compound([op.sequence(sid, 1, 0, 0, True)])
+    check(res, NFS4ERR_REP_TOO_BIG_TO_CACHE)
-- 
1.7.4.1


--
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