All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pynfs: fix reporting of ignored tests
@ 2013-10-05 20:27 Tigran Mkrtchyan
  2013-10-07 15:05 ` J. Bruce Fields
  0 siblings, 1 reply; 7+ messages in thread
From: Tigran Mkrtchyan @ 2013-10-05 20:27 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs, Tigran Mkrtchyan

currently, ignored tests reported as failure, which
makes fixing them quite hard.

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
---
 nfs4.1/testmod.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py
index 3d74efe..68855de 100644
--- a/nfs4.1/testmod.py
+++ b/nfs4.1/testmod.py
@@ -439,6 +439,7 @@ def printresults(tests, opts, file=None):
 def xml_printresults(tests, file_name, suite='all'):
     with open(file_name, 'w') as fd:
         failures = 0
+        skipped = 0
         total_time = 0
         doc = xml.dom.minidom.Document()
         testsuite = doc.createElement("testsuite")
@@ -455,14 +456,19 @@ def xml_printresults(tests, file_name, suite='all'):
             testcase.setAttribute("time", str(t.time_taken))
 
             total_time += t.time_taken
-            if t.result not in (TEST_PASS, TEST_WARN):
+            if t.result == TEST_FAIL:
                 failures += 1
                 failure = doc.createElement("failure")
                 failure.setAttribute("message", t.result.msg)
                 err = doc.createCDATASection(''.join(t.result.tb))
                 failure.appendChild(err)
                 testcase.appendChild(failure)
+            elif t.result == TEST_OMIT:
+                skipped += 1
+                skip = doc.createElement("skipped")
+                testcase.appendChild(skip)
 
         testsuite.setAttribute("failures", str(failures))
+        testsuite.setAttribute("skipped", str(skipped))
         testsuite.setAttribute("time", str(total_time))
         fd.write(doc.toprettyxml(indent="  "))
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] pynfs: fix reporting of ignored tests
  2013-10-05 20:27 [PATCH] pynfs: fix reporting of ignored tests Tigran Mkrtchyan
@ 2013-10-07 15:05 ` J. Bruce Fields
  2013-10-07 16:05   ` Frank Filz
  2013-10-07 17:47   ` Mkrtchyan, Tigran
  0 siblings, 2 replies; 7+ messages in thread
From: J. Bruce Fields @ 2013-10-07 15:05 UTC (permalink / raw)
  To: Tigran Mkrtchyan; +Cc: linux-nfs

On Sat, Oct 05, 2013 at 10:27:15PM +0200, Tigran Mkrtchyan wrote:
> currently, ignored tests reported as failure, which
> makes fixing them quite hard.

Thanks.  And it's not counting warnings either?  I wonder if
printresults and xml_printresults should be sharing some code?

--b.

> 
> Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
> ---
>  nfs4.1/testmod.py | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py
> index 3d74efe..68855de 100644
> --- a/nfs4.1/testmod.py
> +++ b/nfs4.1/testmod.py
> @@ -439,6 +439,7 @@ def printresults(tests, opts, file=None):
>  def xml_printresults(tests, file_name, suite='all'):
>      with open(file_name, 'w') as fd:
>          failures = 0
> +        skipped = 0
>          total_time = 0
>          doc = xml.dom.minidom.Document()
>          testsuite = doc.createElement("testsuite")
> @@ -455,14 +456,19 @@ def xml_printresults(tests, file_name, suite='all'):
>              testcase.setAttribute("time", str(t.time_taken))
>  
>              total_time += t.time_taken
> -            if t.result not in (TEST_PASS, TEST_WARN):
> +            if t.result == TEST_FAIL:
>                  failures += 1
>                  failure = doc.createElement("failure")
>                  failure.setAttribute("message", t.result.msg)
>                  err = doc.createCDATASection(''.join(t.result.tb))
>                  failure.appendChild(err)
>                  testcase.appendChild(failure)
> +            elif t.result == TEST_OMIT:
> +                skipped += 1
> +                skip = doc.createElement("skipped")
> +                testcase.appendChild(skip)
>  
>          testsuite.setAttribute("failures", str(failures))
> +        testsuite.setAttribute("skipped", str(skipped))
>          testsuite.setAttribute("time", str(total_time))
>          fd.write(doc.toprettyxml(indent="  "))
> -- 
> 1.8.3.1
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] pynfs: fix reporting of ignored tests
  2013-10-07 15:05 ` J. Bruce Fields
@ 2013-10-07 16:05   ` Frank Filz
  2013-10-07 17:45     ` Mkrtchyan, Tigran
  2013-10-07 17:47   ` Mkrtchyan, Tigran
  1 sibling, 1 reply; 7+ messages in thread
From: Frank Filz @ 2013-10-07 16:05 UTC (permalink / raw)
  To: 'J. Bruce Fields', 'Tigran Mkrtchyan'; +Cc: linux-nfs

Tigran,

You also modified DSESS9005, should that actually be split into two separate
test cases?

Hmm, looks like a set of 4.1 tests that are not part of all that I need to
see how they fare against Ganesha.

Frank

> -----Original Message-----
> From: linux-nfs-owner@vger.kernel.org [mailto:linux-nfs-
> owner@vger.kernel.org] On Behalf Of J. Bruce Fields
> Sent: Monday, October 7, 2013 8:05 AM
> To: Tigran Mkrtchyan
> Cc: linux-nfs@vger.kernel.org
> Subject: Re: [PATCH] pynfs: fix reporting of ignored tests
> 
> On Sat, Oct 05, 2013 at 10:27:15PM +0200, Tigran Mkrtchyan wrote:
> > currently, ignored tests reported as failure, which makes fixing them
> > quite hard.
> 
> Thanks.  And it's not counting warnings either?  I wonder if printresults
and
> xml_printresults should be sharing some code?
> 
> --b.
> 
> >
> > Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
> > ---
> >  nfs4.1/testmod.py | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py index
> > 3d74efe..68855de 100644
> > --- a/nfs4.1/testmod.py
> > +++ b/nfs4.1/testmod.py
> > @@ -439,6 +439,7 @@ def printresults(tests, opts, file=None):
> >  def xml_printresults(tests, file_name, suite='all'):
> >      with open(file_name, 'w') as fd:
> >          failures = 0
> > +        skipped = 0
> >          total_time = 0
> >          doc = xml.dom.minidom.Document()
> >          testsuite = doc.createElement("testsuite") @@ -455,14 +456,19
> > @@ def xml_printresults(tests, file_name, suite='all'):
> >              testcase.setAttribute("time", str(t.time_taken))
> >
> >              total_time += t.time_taken
> > -            if t.result not in (TEST_PASS, TEST_WARN):
> > +            if t.result == TEST_FAIL:
> >                  failures += 1
> >                  failure = doc.createElement("failure")
> >                  failure.setAttribute("message", t.result.msg)
> >                  err = doc.createCDATASection(''.join(t.result.tb))
> >                  failure.appendChild(err)
> >                  testcase.appendChild(failure)
> > +            elif t.result == TEST_OMIT:
> > +                skipped += 1
> > +                skip = doc.createElement("skipped")
> > +                testcase.appendChild(skip)
> >
> >          testsuite.setAttribute("failures", str(failures))
> > +        testsuite.setAttribute("skipped", str(skipped))
> >          testsuite.setAttribute("time", str(total_time))
> >          fd.write(doc.toprettyxml(indent="  "))
> > --
> > 1.8.3.1
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the
> body of a message to majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] pynfs: fix reporting of ignored tests
  2013-10-07 16:05   ` Frank Filz
@ 2013-10-07 17:45     ` Mkrtchyan, Tigran
  2013-10-07 17:48       ` Frank Filz
  0 siblings, 1 reply; 7+ messages in thread
From: Mkrtchyan, Tigran @ 2013-10-07 17:45 UTC (permalink / raw)
  To: Frank Filz; +Cc: J. Bruce Fields, linux-nfs



----- Original Message -----
> From: "Frank Filz" <ffilzlnx@mindspring.com>
> To: "J. Bruce Fields" <bfields@fieldses.org>, "Tigran Mkrtchyan" <tigran.mkrtchyan@desy.de>
> Cc: linux-nfs@vger.kernel.org
> Sent: Monday, October 7, 2013 6:05:08 PM
> Subject: RE: [PATCH] pynfs: fix reporting of ignored tests
> 
> Tigran,
> 
Hi Frank,

> You also modified DSESS9005, should that actually be split into two separate
> test cases?

I was thinking to add one with compound: SEQ, PUTROOTFH, DESTROY_SESSION

Tigran.

> 
> Hmm, looks like a set of 4.1 tests that are not part of all that I need to
> see how they fare against Ganesha.
> 
> Frank
> 
> > -----Original Message-----
> > From: linux-nfs-owner@vger.kernel.org [mailto:linux-nfs-
> > owner@vger.kernel.org] On Behalf Of J. Bruce Fields
> > Sent: Monday, October 7, 2013 8:05 AM
> > To: Tigran Mkrtchyan
> > Cc: linux-nfs@vger.kernel.org
> > Subject: Re: [PATCH] pynfs: fix reporting of ignored tests
> > 
> > On Sat, Oct 05, 2013 at 10:27:15PM +0200, Tigran Mkrtchyan wrote:
> > > currently, ignored tests reported as failure, which makes fixing them
> > > quite hard.
> > 
> > Thanks.  And it's not counting warnings either?  I wonder if printresults
> and
> > xml_printresults should be sharing some code?
> > 
> > --b.
> > 
> > >
> > > Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
> > > ---
> > >  nfs4.1/testmod.py | 8 +++++++-
> > >  1 file changed, 7 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py index
> > > 3d74efe..68855de 100644
> > > --- a/nfs4.1/testmod.py
> > > +++ b/nfs4.1/testmod.py
> > > @@ -439,6 +439,7 @@ def printresults(tests, opts, file=None):
> > >  def xml_printresults(tests, file_name, suite='all'):
> > >      with open(file_name, 'w') as fd:
> > >          failures = 0
> > > +        skipped = 0
> > >          total_time = 0
> > >          doc = xml.dom.minidom.Document()
> > >          testsuite = doc.createElement("testsuite") @@ -455,14 +456,19
> > > @@ def xml_printresults(tests, file_name, suite='all'):
> > >              testcase.setAttribute("time", str(t.time_taken))
> > >
> > >              total_time += t.time_taken
> > > -            if t.result not in (TEST_PASS, TEST_WARN):
> > > +            if t.result == TEST_FAIL:
> > >                  failures += 1
> > >                  failure = doc.createElement("failure")
> > >                  failure.setAttribute("message", t.result.msg)
> > >                  err = doc.createCDATASection(''.join(t.result.tb))
> > >                  failure.appendChild(err)
> > >                  testcase.appendChild(failure)
> > > +            elif t.result == TEST_OMIT:
> > > +                skipped += 1
> > > +                skip = doc.createElement("skipped")
> > > +                testcase.appendChild(skip)
> > >
> > >          testsuite.setAttribute("failures", str(failures))
> > > +        testsuite.setAttribute("skipped", str(skipped))
> > >          testsuite.setAttribute("time", str(total_time))
> > >          fd.write(doc.toprettyxml(indent="  "))
> > > --
> > > 1.8.3.1
> > >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the
> > body of a message to majordomo@vger.kernel.org More majordomo info at
> > http://vger.kernel.org/majordomo-info.html
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] pynfs: fix reporting of ignored tests
  2013-10-07 15:05 ` J. Bruce Fields
  2013-10-07 16:05   ` Frank Filz
@ 2013-10-07 17:47   ` Mkrtchyan, Tigran
  2013-10-07 18:25     ` J. Bruce Fields
  1 sibling, 1 reply; 7+ messages in thread
From: Mkrtchyan, Tigran @ 2013-10-07 17:47 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: linux-nfs



----- Original Message -----
> From: "J. Bruce Fields" <bfields@fieldses.org>
> To: "Tigran Mkrtchyan" <tigran.mkrtchyan@desy.de>
> Cc: linux-nfs@vger.kernel.org
> Sent: Monday, October 7, 2013 5:05:07 PM
> Subject: Re: [PATCH] pynfs: fix reporting of ignored tests
> 
> On Sat, Oct 05, 2013 at 10:27:15PM +0200, Tigran Mkrtchyan wrote:
> > currently, ignored tests reported as failure, which
> > makes fixing them quite hard.
> 
> Thanks.  And it's not counting warnings either?  I wonder if

The JUnit format does not have WARN. I can count them as failed.
> printresults and xml_printresults should be sharing some code?

I can will check how code duplication can be reduced as well as make
nfsv4.0 able to use it as well.

Tigran.
> 
> --b.
> 
> > 
> > Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
> > ---
> >  nfs4.1/testmod.py | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py
> > index 3d74efe..68855de 100644
> > --- a/nfs4.1/testmod.py
> > +++ b/nfs4.1/testmod.py
> > @@ -439,6 +439,7 @@ def printresults(tests, opts, file=None):
> >  def xml_printresults(tests, file_name, suite='all'):
> >      with open(file_name, 'w') as fd:
> >          failures = 0
> > +        skipped = 0
> >          total_time = 0
> >          doc = xml.dom.minidom.Document()
> >          testsuite = doc.createElement("testsuite")
> > @@ -455,14 +456,19 @@ def xml_printresults(tests, file_name, suite='all'):
> >              testcase.setAttribute("time", str(t.time_taken))
> >  
> >              total_time += t.time_taken
> > -            if t.result not in (TEST_PASS, TEST_WARN):
> > +            if t.result == TEST_FAIL:
> >                  failures += 1
> >                  failure = doc.createElement("failure")
> >                  failure.setAttribute("message", t.result.msg)
> >                  err = doc.createCDATASection(''.join(t.result.tb))
> >                  failure.appendChild(err)
> >                  testcase.appendChild(failure)
> > +            elif t.result == TEST_OMIT:
> > +                skipped += 1
> > +                skip = doc.createElement("skipped")
> > +                testcase.appendChild(skip)
> >  
> >          testsuite.setAttribute("failures", str(failures))
> > +        testsuite.setAttribute("skipped", str(skipped))
> >          testsuite.setAttribute("time", str(total_time))
> >          fd.write(doc.toprettyxml(indent="  "))
> > --
> > 1.8.3.1
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] pynfs: fix reporting of ignored tests
  2013-10-07 17:45     ` Mkrtchyan, Tigran
@ 2013-10-07 17:48       ` Frank Filz
  0 siblings, 0 replies; 7+ messages in thread
From: Frank Filz @ 2013-10-07 17:48 UTC (permalink / raw)
  To: 'Mkrtchyan, Tigran'; +Cc: 'J. Bruce Fields', linux-nfs

> > Tigran,
> >
> Hi Frank,
> 
> > You also modified DSESS9005, should that actually be split into two
> > separate test cases?
> 
> I was thinking to add one with compound: SEQ, PUTROOTFH,
> DESTROY_SESSION

Yea, that would be good.

Frank



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] pynfs: fix reporting of ignored tests
  2013-10-07 17:47   ` Mkrtchyan, Tigran
@ 2013-10-07 18:25     ` J. Bruce Fields
  0 siblings, 0 replies; 7+ messages in thread
From: J. Bruce Fields @ 2013-10-07 18:25 UTC (permalink / raw)
  To: Mkrtchyan, Tigran; +Cc: linux-nfs

On Mon, Oct 07, 2013 at 07:47:58PM +0200, Mkrtchyan, Tigran wrote:
> 
> 
> ----- Original Message -----
> > From: "J. Bruce Fields" <bfields@fieldses.org>
> > To: "Tigran Mkrtchyan" <tigran.mkrtchyan@desy.de>
> > Cc: linux-nfs@vger.kernel.org
> > Sent: Monday, October 7, 2013 5:05:07 PM
> > Subject: Re: [PATCH] pynfs: fix reporting of ignored tests
> > 
> > On Sat, Oct 05, 2013 at 10:27:15PM +0200, Tigran Mkrtchyan wrote:
> > > currently, ignored tests reported as failure, which
> > > makes fixing them quite hard.
> > 
> > Thanks.  And it's not counting warnings either?  I wonder if
> 
> The JUnit format does not have WARN. I can count them as failed.
> > printresults and xml_printresults should be sharing some code?
> 
> I can will check how code duplication can be reduced

Thanks!

> as well as make nfsv4.0 able to use it as well.

Note testmod.py is actually shared between the two (it's a symlink), so
this should be done.

--b.


> 
> Tigran.
> > 
> > --b.
> > 
> > > 
> > > Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
> > > ---
> > >  nfs4.1/testmod.py | 8 +++++++-
> > >  1 file changed, 7 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py
> > > index 3d74efe..68855de 100644
> > > --- a/nfs4.1/testmod.py
> > > +++ b/nfs4.1/testmod.py
> > > @@ -439,6 +439,7 @@ def printresults(tests, opts, file=None):
> > >  def xml_printresults(tests, file_name, suite='all'):
> > >      with open(file_name, 'w') as fd:
> > >          failures = 0
> > > +        skipped = 0
> > >          total_time = 0
> > >          doc = xml.dom.minidom.Document()
> > >          testsuite = doc.createElement("testsuite")
> > > @@ -455,14 +456,19 @@ def xml_printresults(tests, file_name, suite='all'):
> > >              testcase.setAttribute("time", str(t.time_taken))
> > >  
> > >              total_time += t.time_taken
> > > -            if t.result not in (TEST_PASS, TEST_WARN):
> > > +            if t.result == TEST_FAIL:
> > >                  failures += 1
> > >                  failure = doc.createElement("failure")
> > >                  failure.setAttribute("message", t.result.msg)
> > >                  err = doc.createCDATASection(''.join(t.result.tb))
> > >                  failure.appendChild(err)
> > >                  testcase.appendChild(failure)
> > > +            elif t.result == TEST_OMIT:
> > > +                skipped += 1
> > > +                skip = doc.createElement("skipped")
> > > +                testcase.appendChild(skip)
> > >  
> > >          testsuite.setAttribute("failures", str(failures))
> > > +        testsuite.setAttribute("skipped", str(skipped))
> > >          testsuite.setAttribute("time", str(total_time))
> > >          fd.write(doc.toprettyxml(indent="  "))
> > > --
> > > 1.8.3.1
> > > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-10-07 18:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-05 20:27 [PATCH] pynfs: fix reporting of ignored tests Tigran Mkrtchyan
2013-10-07 15:05 ` J. Bruce Fields
2013-10-07 16:05   ` Frank Filz
2013-10-07 17:45     ` Mkrtchyan, Tigran
2013-10-07 17:48       ` Frank Filz
2013-10-07 17:47   ` Mkrtchyan, Tigran
2013-10-07 18:25     ` J. Bruce Fields

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.