Return-Path: linux-nfs-owner@vger.kernel.org Received: from mail-pd0-f176.google.com ([209.85.192.176]:38332 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755207AbaFLBiw (ORCPT ); Wed, 11 Jun 2014 21:38:52 -0400 Received: by mail-pd0-f176.google.com with SMTP id p10so398412pdj.35 for ; Wed, 11 Jun 2014 18:38:51 -0700 (PDT) Message-ID: <53990498.7020300@gmail.com> Date: Thu, 12 Jun 2014 09:38:32 +0800 From: Kinglong Mee MIME-Version: 1.0 To: "J. Bruce Fields" CC: Linux NFS Mailing List , kinglongmee@gmail.com Subject: Re: [PATCH v2] NFS4.1: try to clean sessions after testing References: <5396D7FA.4050303@gmail.com> <5396F243.8080606@gmail.com> <20140611211742.GH19382@fieldses.org> <5398E544.9000105@gmail.com> In-Reply-To: <5398E544.9000105@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-nfs-owner@vger.kernel.org List-ID: On 6/12/2014 07:24, Kinglong Mee wrote: > On 6/12/2014 05:17, J. Bruce Fields wrote: >> I tried to apply this, and the ipv6 patch (could we do that for 4.1 >> too?) and the 3 other patches, but: > > nfs4.1 has supports IPv6, the patch for nfs4.0 is a back-port from nfs4.1. > >> >> - there are some conflicts with the latest pynfs (e.g. I already >> added a few acl tests, apologies) >> - I'm getting failures to write to a read-only fs, apparently >> one of the tests is trying to write to the export root? I >> didn't check which one. Can you show me more information about this? thanks, Kinglong Mee >> >> Could you look into those and resend your pynfs patches? Thanks! > > Yes, I will check those patch and resend them. > > thanks, > Kinglong Mee > >> >> --b. >> >> >> On Tue, Jun 10, 2014 at 07:55:47PM +0800, Kinglong Mee wrote: >>> There are many sessions left after testing, they hold drc memory at server. >>> This patch tries to clean session after each testcase. >>> >>> v2, >>> adds empty function of clean_sessions for nfs4.0, >>> because they are using the same testmod.py >>> >>> Signed-off-by: Kinglong Mee >>> --- >>> nfs4.0/servertests/environment.py | 3 +++ >>> nfs4.1/server41tests/environment.py | 7 ++++++- >>> nfs4.1/testmod.py | 1 + >>> 3 files changed, 10 insertions(+), 1 deletion(-) >>> >>> diff --git a/nfs4.0/servertests/environment.py b/nfs4.0/servertests/environment.py >>> index 993320d..9852178 100644 >>> --- a/nfs4.0/servertests/environment.py >>> +++ b/nfs4.0/servertests/environment.py >>> @@ -226,6 +226,9 @@ class Environment(testmod.Environment): >>> cmd += ' ' + args >>> os.system(cmd); >>> >>> + def clean_sessions(self): >>> + return >>> + >>> ######################################### >>> debug_fail = False >>> >>> diff --git a/nfs4.1/server41tests/environment.py b/nfs4.1/server41tests/environment.py >>> index b2df732..7632655 100644 >>> --- a/nfs4.1/server41tests/environment.py >>> +++ b/nfs4.1/server41tests/environment.py >>> @@ -248,7 +248,12 @@ class Environment(testmod.Environment): >>> def testname(self, t): >>> """Returns a name for the test that is unique between runs""" >>> return "%s_%i" % (t.code, self.timestamp) >>> - >>> + >>> + def clean_sessions(self): >>> + """Destroy client name env.c1""" >>> + for sessionid in self.c1.sessions.keys(): >>> + self.c1.compound([op.destroy_session(sessionid)]) >>> + >>> ######################################### >>> debug_fail = False >>> >>> diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py >>> index 5908066..661aed0 100644 >>> --- a/nfs4.1/testmod.py >>> +++ b/nfs4.1/testmod.py >>> @@ -220,6 +220,7 @@ class Test(object): >>> environment.startUp() >>> self.runtest(self, environment) >>> self.result = self._pass_result >>> + environment.clean_sessions() >>> except KeyboardInterrupt: >>> raise >>> except TestException, e: >>> -- >>> 1.9.3 >>> >> >