All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Mayhew <smayhew@redhat.com>
To: bfields@fieldses.org
Cc: jlayton@kernel.org, linux-nfs@vger.kernel.org
Subject: [pynfs PATCH 2/4] nfs4.1: add some more reboot tests
Date: Thu, 14 Mar 2019 17:12:08 -0400	[thread overview]
Message-ID: <20190314211210.7454-3-smayhew@redhat.com> (raw)
In-Reply-To: <20190314211210.7454-1-smayhew@redhat.com>

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


  parent reply	other threads:[~2019-03-14 21:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-14 21:12 [pynfs PATCH 0/4] nfs4.1: add a bunch of reboot tests Scott Mayhew
2019-03-14 21:12 ` [pynfs PATCH 1/4] nfs4.1: add some " Scott Mayhew
2019-03-15 19:43   ` J. Bruce Fields
2019-03-15 19:52     ` Scott Mayhew
2019-03-15 20:50       ` J. Bruce Fields
2019-03-15 20:48   ` J. Bruce Fields
2019-03-18 14:30     ` Frank Filz
2019-03-18 14:57       ` 'J. Bruce Fields'
2019-03-14 21:12 ` Scott Mayhew [this message]
2019-03-14 21:12 ` [pynfs PATCH 3/4] nfs4.1: still more " Scott Mayhew
2019-03-14 21:12 ` [pynfs PATCH 4/4] nfs4.1: test delayed reclaim following a server reboot Scott Mayhew
2019-03-14 21:48 ` [pynfs PATCH 0/4] nfs4.1: add a bunch of reboot tests J. Bruce Fields
2019-03-14 23:18   ` Scott Mayhew
2019-03-15  1:00     ` J. Bruce Fields
2019-03-15  1:03       ` J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190314211210.7454-3-smayhew@redhat.com \
    --to=smayhew@redhat.com \
    --cc=bfields@fieldses.org \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.