[Piglit] [PATCH 1/1] results.py: Print warning when overwriting subtest results

Jan Vesely jan.vesely at rutgers.edu
Thu Sep 4 14:25:56 PDT 2014


On Thu, 2014-09-04 at 13:39 -0700, Dylan Baker wrote:
> On Wednesday, September 03, 2014 09:44:08 PM Ilia Mirkin wrote:
> [snip]
> > Hmmmm.... right. In the Test constructor:
> > 
> >         self.result = TestResult({'result': 'fail'})

removing this prevents any test from executing.

[SNIP]

> > >>
> > >> Printing stuff right there goes against the logging logic... I think
> > >> TestResults are also used during test execution, not just at summary
> > >> time... Dylan may have ideas on how to expose the issue properly.
> > >
> > > These need to be detected at execution time otherwise only the last
> > > result is stored in the results file and we loose information (and hide
> > > possible failures).
> > > if there is a better way to report these, I don;t mind changing it.
> 
> This feels like working around bugs in our own software. My opinion on
> the matter is that sub-tests should not have the same name, and if they
> do that's a bug. I think an assert should cover this, if there is a
> duplicate, it hits the assert and the test fails with an assertion.
> 
> I'm also rather against printing a warning. If being able to do this
> more than once, why don't we add a new method that tests for duplicate
> sub-tests, and returns a report. Do something like count the number of
> times a specific test name is reported?

Warning was just one way to report the problem, I'm OK with whatever
approach fits the piglit best. Although seeing a list of duplicate names
in the console made fixing them easier.

jan

> 
> [snip]

-- 
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140904/78d7742c/attachment.sig>


More information about the Piglit mailing list