diff mbox series

[pynfs,2/4] nfs4.1: add some more reboot tests

Message ID 20190314211210.7454-3-smayhew@redhat.com (mailing list archive)
State New, archived
Headers show
Series nfs4.1: add a bunch of reboot tests | expand

Commit Message

Scott Mayhew March 14, 2019, 9:12 p.m. UTC
REBT3a, REBT3b, and REBT3c test recovery with multiple clients following
a server reboot, where the server reboots again during the grace period
while clients are still reclaiming.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
 nfs4.1/server41tests/st_reboot.py | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/nfs4.1/server41tests/st_reboot.py b/nfs4.1/server41tests/st_reboot.py
index 0216127..8bce9ec 100644
--- a/nfs4.1/server41tests/st_reboot.py
+++ b/nfs4.1/server41tests/st_reboot.py
@@ -149,7 +149,7 @@  def doTestAllClientsNoGrace(t, env, states):
             log.warn("server took approximately %d seconds to lift grace "
                         "after all clients reclaimed" % lift_time)
 
-def doTestRebootWithNClients(t, env, n=10):
+def doTestRebootWithNClients(t, env, n=10, double_reboot=False):
     boot_time = int(time.time())
     lease_time = 90
     states = []
@@ -166,6 +166,11 @@  def doTestRebootWithNClients(t, env, n=10):
     boot_time = _waitForReboot(env)
 
     try:
+        if double_reboot:
+            for i in range(n/2):
+                lease_time = doTestOneClientGrace(t, env, states[i])
+            boot_time = _waitForReboot(env)
+
         for i in range(n):
             lease_time = doTestOneClientGrace(t, env, states[i])
 
@@ -210,3 +215,27 @@  def testRebootWithManyManyManyClients(t, env):
     CODE: REBT2c
     """
     return doTestRebootWithNClients(t, env, 1000)
+
+def testDoubleRebootWithManyClients(t, env):
+    """Double reboot with many clients
+
+    FLAGS: reboot
+    CODE: REBT3a
+    """
+    return doTestRebootWithNClients(t, env, double_reboot=True)
+
+def testDoubleRebootWithManyManyClients(t, env):
+    """Double reboot with many many clients
+
+    FLAGS: reboot
+    CODE: REBT3b
+    """
+    return doTestRebootWithNClients(t, env, 100, True)
+
+def testDoubleRebootWithManyManyManyClients(t, env):
+    """Double reboot with many many many clients
+
+    FLAGS: reboot
+    CODE: REBT3c
+    """
+    return doTestRebootWithNClients(t, env, 1000, True)