[Piglit] [PATCH] framework: fix running with mixed concurrency (neither -c or -1)

Dylan Baker dylan at pnwbakers.com
Wed May 9 16:57:51 UTC 2018


Quoting Arkadiusz Hiler (2018-05-09 03:56:53)
> On Tue, May 08, 2018 at 10:32:26AM -0700, Dylan Baker wrote:
> > test_list is an iterator, you can't walk an iterator more than once. To
> > solve this we use itertools.tee, which creates a shared buffer for the
> > iterators to draw from. This fixes errors like:
> > 
> > [000/480]
> > Traceback (most recent call last):
> >   File "./piglit", line 178, in <module>
> >     main()
> >   File "./piglit", line 174, in main
> >     sys.exit(runner(args))
> >   File "/home/user/piglit/framework/exceptions.py", line 51, in _inner
> >     func(*args, **kwargs)
> >   File "/home/user/piglit/framework/programs/run.py", line 370, in run
> >     backend.finalize({'time_elapsed': time_elapsed.to_json()})
> >   File "/home/user/piglit/framework/backends/json.py", line 163, in finalize
> >     assert data['tests']
> >   AssertionError
> > 
> > Thanks Tomi for figuring out what was wrong with the original patch!
> > 
> > CC: Michel Dänzer <michel at daenzer.net>
> > CC: Tomi Sarvela <tomi.p.sarvela at intel.com>
> > CC: "Juan A. Suarez Romero" <jasuarez at igalia.com>
> 
> Oh, just noticed that (well, actually Tomi told me about this).
> 
> I've sent another patch which fixes the same issue in a slightly
> different way. Sorry for the duplication!

No worries! It's nice that there's other people looking at the framework besides
me :)

Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20180509/75525e40/attachment.sig>


More information about the Piglit mailing list