All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Mayhew <smayhew@redhat.com>
To: bfields@fieldses.org
Cc: linux-nfs@vger.kernel.org
Subject: [pynfs PATCH 1/3] nfs4.1: don't cache sessionids and clientids after destroying
Date: Mon, 11 Mar 2019 11:49:49 -0400	[thread overview]
Message-ID: <20190311154951.6144-2-smayhew@redhat.com> (raw)
In-Reply-To: <20190311154951.6144-1-smayhew@redhat.com>

Test.run() cleans up session and client records after every test, but
that cleanup doesn't get rid of the locally cached sessionids and
clientids, resulting in subsequent tests sending a multiple bogus
DESTROY_SESSIONs and DESTROY_CLIENTIDs which all return
NFS4ERR_BADSESSION and NFS4ERR_STALE_CLIENTID.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
 nfs4.1/server41tests/environment.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/nfs4.1/server41tests/environment.py b/nfs4.1/server41tests/environment.py
index 9e1201f..1a898f8 100644
--- a/nfs4.1/server41tests/environment.py
+++ b/nfs4.1/server41tests/environment.py
@@ -256,11 +256,13 @@ class Environment(testmod.Environment):
         """Destroy client name env.c1"""
         for sessionid in self.c1.sessions.keys():
             self.c1.compound([op.destroy_session(sessionid)])
+            del(self.c1.sessions[sessionid])
 
     def clean_clients(self):
         """Destroy client name env.c1"""
         for clientid in self.c1.clients.keys():
             self.c1.compound([op.destroy_clientid(clientid)])
+            del(self.c1.clients[clientid])
 
 #########################################
 debug_fail = False
-- 
2.17.2


  reply	other threads:[~2019-03-11 15:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 15:49 [pynfs PATCH 0/3] a few fixes Scott Mayhew
2019-03-11 15:49 ` Scott Mayhew [this message]
2019-03-11 15:49 ` [pynfs PATCH 2/3] nfs4.1: clean up the session and client created in Environment.finish() Scott Mayhew
2019-03-11 15:49 ` [pynfs PATCH 3/3] nfs4.1: close the file created in SEQ10b Scott Mayhew
2019-03-13 14:56 ` [pynfs PATCH 0/3] a few fixes 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=20190311154951.6144-2-smayhew@redhat.com \
    --to=smayhew@redhat.com \
    --cc=bfields@fieldses.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.