[pynfs PATCH 1/3] nfs4.1: don't cache sessionids and clientids after destroying

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

 



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




[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