<div dir="ltr"><div class="gmail_extra">I have applied the suggestions that Dylan Baker suggested to the following patches.<br><br>* framework/summary.py: add crashed page.<br>* cmake: use PythonInterp package and update version.<br>
<br></div><div class="gmail_extra">I will be submitting the updated patch set in a few days after I get more feedback on the<br>other patches.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 31, 2013 at 9:47 AM, Kenney Phillis <span dir="ltr"><<a href="mailto:kphillisjr@gmail.com" target="_blank">kphillisjr@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I know this is a long patch and contains some features that have already<br>
been discussed earlier this year. However each feature serves an important<br>
task.<br>
<br>
<br>
<br>
Feature 1: Signal Handler<br>
Signal handlers may not seem like a lot, but on some platforms they are<br>
a critical task to ensure piglit will function even remotely correctly.<br>
A primary example of this is the signal handler used for Windows. Without<br>
this running any remotely long series of tests would require interaction.<br>
This completely defeats the purpose of having automated testing since it<br>
would mean that all of the tests will not be ran automatically but instead<br>
the testing will grind to an halt.<br>
<br>
When an appropriate signal is detected, the Signal handler will on it's<br>
own will attempt to create a backtrace. This is useful since the output<br>
can easily be used by addr2line to find out where the crash happened in<br>
the source tree.<br>
<br>
Feature 2: Windows Signal Handler<br>
This is a signal handlered aimed for windows developers only. This feature<br>
will work on any system running Windows XP or up because of the fact that<br>
this also implements support for Vectored Exception Handling [1]. This<br>
signal handler will also generate backtraces on it's own using built<br>
in functionality that is included with windows. The features with this<br>
can safely be updated to a minimum of Windows Vista without any major<br>
changes.<br>
<br>
<br>
Feature 3: New framework - GLFW<br>
The GLFW[2] framework I implemented exposes OpenGL 3.x support on platforms<br>
where there is a lack of a c99 compliant compiler ( for example MSVC )<br>
and should work the same as any other framework. The only limitation<br>
I can find with this is that the library only supports creating<br>
double buffered windows. I do not know if this is going to be a problem<br>
with tests that do not specify this flag.<br>
<br>
Note 1: This framework supports OpenGL ES, but I have not enabled nor<br>
verified that this works.<br>
<br>
Note 2: This framework supports internal GLFW builds by simply uncompressing<br>
the source file into the root piglit directory and renaming the folder glfw.<br>
This method should work automatically if the file glfw/CMakeLists.txt is<br>
found during the configuration phase.<br>
<br>
Feature 4: Use PythonInterp to detect python.<br>
This is an important change for some platforms ( like windows ) because<br>
many users may not have python added to the path variable<br>
NOTE: This feature required increasing the minimum cmake version to 2.8.6<br>
because older versions did not properly honor the minimum version<br>
argument of find_package. This should make things easier overall because<br>
it is easy to change the python search to 3.x when the change is needed.<br>
<br>
Feature 5: Add a crash listing page to the html summary.<br>
I know this is not a large feature, but it should still be in place, since<br>
sometimes as a developer it's important to quickly determine what tests<br>
have crashed.<br>
<br>
TODO List:<br>
* Add OSX Signal handler - There is some serious overhead with using a<br>
posix compliant signal handler on OSX and it can lead to problems.<br>
This means that a mach compatible execution handler is a must.<br>
<br>
* Further test the Windows execution handler. I do not know if this<br>
automatic debug handler will suite windows developers well, but at<br>
least it is easily possible to identify exactly which line in the<br>
particular test is the source of the crash and to take this output<br>
and use it to possibly pinpoint where in the driver the actual crash<br>
happened.<br>
<br>
* Verify that the piglit run framework handles the new result output<br>
properly. I added a new report string ( crashed ) to assist with the<br>
signal handlers.<br>
<br>
[1] MSDN Magazine ( Sept 2001):<br>
Under the Hood: New Vectored Exception Handling in Windows XP<br>
<a href="http://msdn.microsoft.com/en-us/magazine/cc301714.aspx" target="_blank">http://msdn.microsoft.com/en-us/magazine/cc301714.aspx</a><br>
<br>
[2] GLFW - An OpenGL Library<br>
<a href="http://www.glfw.org/" target="_blank">http://www.glfw.org/</a><br>
<br>
<br>
Kenney Phillis (13):<br>
util: add PIGLIT_CRASH to the list of valid results.<br>
cmake: link OpenGL and OpenGL ES utility libs to piglitutil.<br>
util: Implement signal handler support.<br>
piglit-framework-gl: Add piglit signal handler.<br>
util: Implement signal handler on windows.<br>
cmake: make sure the hiz tests link against piglitutil.<br>
piglit-framework: Implement glfw support.<br>
piglit-framework: Add support for static glfw usage.<br>
tests/glx: Enable signal handler support.<br>
tests/egl: add support for signal handler.<br>
framework/summary.py: add crashed page.<br>
cmake: Relax waffle requirement.<br>
cmake: use PythonInterp package and update version.<br>
<br>
.gitignore | 3 +<br>
CMakeLists.txt | 127 ++++--<br>
framework/summary.py | 9 +-<br>
tests/egl/egl-create-surface.c | 2 +<br>
tests/egl/egl-nok-swap-region.c | 2 +<br>
tests/egl/egl-nok-texture-from-pixmap.c | 2 +<br>
tests/egl/egl-query-surface.c | 2 +<br>
tests/fbo/CMakeLists.gl.txt | 4 +-<br>
tests/general/CMakeLists.gl.txt | 4 +-<br>
tests/glx/glx-close-display.c | 3 +<br>
tests/glx/glx-copy-sub-buffer.c | 2 +<br>
tests/glx/glx-destroycontext-1.c | 4 +-<br>
tests/glx/glx-destroycontext-2.c | 2 +<br>
tests/glx/glx-dont-care-mask.c | 2 +<br>
tests/glx/glx-fbconfig-compliance.c | 2 +<br>
tests/glx/glx-fbconfig-sanity.c | 2 +<br>
tests/glx/glx-fbo-binding.c | 2 +<br>
tests/glx/glx-make-current-bad-context.c | 2 +<br>
tests/glx/glx-make-current.c | 2 +<br>
tests/glx/glx-make-glxdrawable-current.c | 2 +<br>
tests/glx/glx-multi-context-ib-1.c | 2 +<br>
tests/glx/glx-multithread-makecurrent-1.c | 2 +<br>
tests/glx/glx-multithread-makecurrent-2.c | 2 +<br>
tests/glx/glx-multithread-makecurrent-3.c | 2 +<br>
tests/glx/glx-multithread-makecurrent-4.c | 2 +<br>
tests/glx/glx-multithread-shader-compile.c | 2 +<br>
tests/glx/glx-multithread-texture.c | 2 +<br>
tests/glx/glx-multithread.c | 2 +<br>
tests/glx/glx-pixmap-crosscheck.c | 2 +<br>
tests/glx/glx-pixmap-life.c | 2 +<br>
tests/glx/glx-pixmap-multi.c | 2 +<br>
tests/glx/glx-pixmap13-life.c | 2 +<br>
tests/glx/glx-query-drawable.c | 2 +<br>
tests/glx/glx-shader-sharing.c | 2 +<br>
tests/glx/glx-string-sanity.c | 2 +<br>
tests/glx/glx-swap-event.c | 4 +-<br>
tests/glx/glx-swap-exchange.c | 2 +<br>
tests/glx/glx-swap-pixmap-bad.c | 2 +<br>
tests/glx/glx-swap-pixmap.c | 2 +<br>
tests/glx/glx-swap-singlebuffer.c | 2 +<br>
tests/glx/glx-tfp.c | 2 +<br>
tests/glx/glx-visuals-depth.c | 2 +<br>
tests/glx/glx-visuals-stencil.c | 2 +<br>
tests/glx/glx-window-life.c | 2 +<br>
tests/hiz/CMakeLists.gl.txt | 1 +<br>
tests/util/CMakeLists.gl.txt | 6 +<br>
tests/util/CMakeLists.gles1.txt | 1 +<br>
tests/util/CMakeLists.gles2.txt | 1 +<br>
tests/util/CMakeLists.gles3.txt | 1 +<br>
tests/util/CMakeLists.no_api.txt | 4 +<br>
tests/util/CMakeLists.txt | 21 +<br>
tests/util/<a href="http://config.h.in" target="_blank">config.h.in</a> | 5 +<br>
tests/util/piglit-framework-gl.h | 10 +<br>
.../util/piglit-framework-gl/piglit_gl_framework.c | 5 +<br>
.../piglit-framework-gl/piglit_glfw_framework.c | 407 ++++++++++++++++++++<br>
.../piglit-framework-gl/piglit_glfw_framework.h | 29 ++<br>
.../piglit-sighandler/piglit-sighandler-none.c | 37 ++<br>
.../piglit-sighandler/piglit-sighandler-posix.c | 209 ++++++++++<br>
.../piglit-sighandler/piglit-sighandler-win32.cpp | 339 ++++++++++++++++<br>
tests/util/piglit-util.c | 5 +<br>
tests/util/piglit-util.h | 15 +-<br>
61 files changed, 1282 insertions(+), 44 deletions(-)<br>
create mode 100644 tests/util/piglit-framework-gl/piglit_glfw_framework.c<br>
create mode 100644 tests/util/piglit-framework-gl/piglit_glfw_framework.h<br>
create mode 100644 tests/util/piglit-sighandler/piglit-sighandler-none.c<br>
create mode 100644 tests/util/piglit-sighandler/piglit-sighandler-posix.c<br>
create mode 100644 tests/util/piglit-sighandler/piglit-sighandler-win32.cpp<br>
<span class=""><font color="#888888"><br>
--<br>
1.7.9.5<br>
<br>
</font></span></blockquote></div><br></div></div>