[PATCH 09/17] CLNT: test Bad Sequenceid At Slot

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

 



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

diff --git a/nfs4.1/server41tests/st_sequence.py b/nfs4.1/server41tests/st_sequence.py
index ed0cc8c..4ea5cab 100644
--- a/nfs4.1/server41tests/st_sequence.py
+++ b/nfs4.1/server41tests/st_sequence.py
@@ -338,3 +338,28 @@ def testSessionidSequenceidSlotid(t, env):
 
     if not nfs4lib.test_equal(res.resarray[0].sr_slotid, 2, "int"):
         fail("server return bad slotid")
+
+def testBadSequenceidAtSlot(t, env):
+    """ If the difference between sa_sequenceid and the server's cached
+        sequence ID at the slot ID is two (2) or more, or if sa_sequenceid
+        is less than the cached sequence ID , server MUST return
+        NFS4ERR_SEQ_MISORDERED. rfc5661 18.46.3
+
+    FLAGS: sequence all
+    CODE: SEQ13
+    """
+    c = env.c1.new_client(env.testname(t))
+    # CREATE_SESSION
+    sess1 = c.create_session()
+
+    sid = sess1.sessionid 
+    res = c.c.compound([op.sequence(sid, 1, 2, 3, True)])
+    check(res)
+
+    seqid = res.resarray[0].sr_sequenceid
+    # SEQUENCE with bad sr_sequenceid
+    res = c.c.compound([op.sequence(sid, seqid + 2, 2, 3, True)])
+    check(res, NFS4ERR_SEQ_MISORDERED)
+
+    res = c.c.compound([op.sequence(sid, nfs4lib.dec_u32(seqid), 2, 3, True)])
+    check(res, NFS4ERR_SEQ_MISORDERED)
-- 
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