2019-03-14 18:56:45

by Jeff Layton

[permalink] [raw]
Subject: [pynfs PATCH] nfs4.1: clean up the session and client created in Environment.init()

Once we've returned from this function the session and client will be
abandoned on the server. Clean them up since we're finished with them
at this point.

Signed-off-by: Jeff Layton <[email protected]>
---
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 0ce6943b19a5..bdfd52d3a171 100644
--- a/nfs4.1/server41tests/environment.py
+++ b/nfs4.1/server41tests/environment.py
@@ -156,6 +156,8 @@ class Environment(testmod.Environment):
# Make sure it is empty
clean_dir(sess, self.opts.home)
sess.c.null()
+ self.clean_sessions()
+ self.clean_clients()

def _maketree(self, sess):
"""Make test tree"""
--
2.20.1



2019-03-15 18:11:48

by J. Bruce Fields

[permalink] [raw]
Subject: Re: [pynfs PATCH] nfs4.1: clean up the session and client created in Environment.init()

On Thu, Mar 14, 2019 at 02:56:41PM -0400, Jeff Layton wrote:
> Once we've returned from this function the session and client will be
> abandoned on the server. Clean them up since we're finished with them
> at this point.

Thanks, applied.--b.

>
> Signed-off-by: Jeff Layton <[email protected]>
> ---
> 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 0ce6943b19a5..bdfd52d3a171 100644
> --- a/nfs4.1/server41tests/environment.py
> +++ b/nfs4.1/server41tests/environment.py
> @@ -156,6 +156,8 @@ class Environment(testmod.Environment):
> # Make sure it is empty
> clean_dir(sess, self.opts.home)
> sess.c.null()
> + self.clean_sessions()
> + self.clean_clients()
>
> def _maketree(self, sess):
> """Make test tree"""
> --
> 2.20.1