[Piglit] Nearly finished: shader_runner running THOUSANDS of tests per process

Dylan Baker baker.dylan.c at gmail.com
Mon Apr 18 16:45:09 UTC 2016


Quoting Marek Olšák (2016-04-16 15:16:34)
> Hi,
> 
> This makes shader_runner very fast. The expected result is 40%
> decrease in quick.py running time, or a 12x faster piglit run if you
> run shader tests alone.
> 
> Branch:
> https://cgit.freedesktop.org/~mareko/piglit/log/?h=shader-runner
> 
> Changes:
> 
> 1) Any number of test files can be specified as command-line
> parameters. Those command lines can be insanely long.
> 
> 2) shader_runner can re-create the window & GL context if test
> requirements demand different settings when going from one test to
> another.
> 
> 3) all.py generates one shader_runner instance per group of tests
> (usually one or two directories - tests and generated_tests).
> Individual tests are reported as subtests.
> 
> The shader_runner part is done. The python part needs more work.
> 
> 
> What's missing:
> 
> Handling of crashes. If shader_runner crashes:
> - The crash is not shown in piglit results (other tests with subtests
> already have the same behavior)
> - The remaining tests will not be run.
> 
> The ShaderTest python class has the list of all files and should be
> able to catch a crash, check how many test results have been written,
> and restart shader_runner with the remaining tests.
> 
> shader_runner prints TEST %i: and then the subtest result. %i is the
> i-th file in the list. Python can parse that and re-run shader_runner
> with the first %i tests removed. (0..%i-1 -> parse subtest results; %i
> -> crash; %i+1.. -> run again)
> 
> 
> I'm by no means a python expert, so here's an alternative solution (for me):
> - Catch crash signals in shader_runner.
> - In the single handler, re-run shader_runner with the remaining tests.
> 
> Opinions welcome,
> 
> Marek
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit

Thanks for working on this Marek,

This has been discussed here several times amongst the intel group, and
the recurring problem to solve is crashing. I don't have a strong
opinion on python vs catching a fail in the signal handler, except that
handling in the python might be more robust, but I'm not really familiar
with what a C signal handler can recover from, so it may not.

The one concern I have is using subtests. There are a couple of
limitations to them, first we'll loose all of the per test stdout/stderr
data, and that seems less than optimal. I wonder if it would be better
to have shader runner print some sort of scissor to stdout and stderr
when it starts a test and when it finishes one, and then report results
as normal without the subtest. That would maintain the output of each
test file, which seems like what we want, otherwise the output will be
jumbled. The other problem with subtests is that the JUnit backend
doesn't have a way to represent subtests at the moment. That would be
problematic for both us and for VMWare.

Looking at the last patch the python isn't all correct there, it will
run in some cases and fail in others, particularly it will do something
odd if fast skipping is enabled, but I'm not sure exactly what. I think
it's worth measuring and seeing if the fast skipping path is even an
optimization with your enhancements, if it's not we should just disable
it for shader_runner or remove it entirely, it would remove a lot of
complexity.

I'd be more than happy to help get the python work done and running,
since this would be really useful for us in our CI system.

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


More information about the Piglit mailing list