Hi,

I created a Piglit test definition [1] before i try to test it out into the V.L.O. i used test-runner to make a run locally (db410c) without lava-dispatcher, the run took ~2 hours 5 minutes [2] (wo download/flash) after that i tried to execute into the V.L.O. and it consumes 8 hours of execution and then finalize with a timeout, the test didn't reach the end and was able to execute only 14486 tests of 39249. 

So i download the definition and executed the lava-run command in my desktop and the full test execution was in ~2 hours 38 minutes that makes sense because needs to download and flash the boot and rootfs images. [4]

I introduced a time call for measure the piglit time execution in test-runner and lava-dispatcher and the exec times are the same ~96 minutes in both executions, search for ' Thank you for running Piglit' in the logs [2][5].

I noticed when i ran lava-run into my desktop the CPU usage increases to 100% when reaches the step of actually running the test [6], i made some debugging and discover that the manner to get the results and notifications from serial console is using pexpect and certain regexes, i attached the gdb to the python process and found that the regexes executes over the whole serial buffer in very short intervals [7]

That could be the reason of the delay in the test execution since the Piglit command takes the same time to run with test-runner and lava-dispatcher.

Best regards,
Anibal

[1] https://git.linaro.org/qa/test-definitions.git/tree/automated/linux/piglit/piglit.yaml
[2] http://qcom-hackbox.linaro.org:8090/stdout_testrunner.log.gz
[3] https://lkft.validation.linaro.org/scheduler/job/101274
[4] http://qcom-hackbox.linaro.org:8090/stdout_dispatcher.log.gz
[5] http://qcom-hackbox.linaro.org:8090/stdout_dispatcher_time.log.gz
[6] http://qcom-hackbox.linaro.org:8090/lava_run_top.log
[7] http://qcom-hackbox.linaro.org:8090/lava_run_gdb.log
[8] https://git.linaro.org/lava/lava-dispatcher.git/tree/lava_dispatcher/actions/test/shell.py#n282