[Piglit] [PATCH 00/14] Move main() from libpiglitutil into each test

Kenneth Graunke kenneth at whitecape.org
Wed Jun 20 02:42:47 PDT 2012


On 06/12/2012 04:02 PM, Chad Versace wrote:
> The goal that this series achieves is to replace the main() function in
> piglit-framework.c with a new function, piglit_gl_test_run(), that takes as
> its input a data structure describing the test initialization info.  This goal
> is a stepping stone towards a larger set of goals discussed earlier this month [1].
> In the future, the piglit_gl_test_info struct will also contain a declarative
> desciption of each test's requirements on GL context flavor, extensions, and
> window systems.
> 
> There is another reason, in addition to those discussed in [1], for why main()
> should be moved out of libpiglitutil.  The EGL tests, GLX tests, and glean all
> define main(), yet also link to libpiglitutil.  Surprisingly, the linker
> doesn't complain. However, the situation is fragile. If you modify the
> libraries or tests in a way that changes the order in which the linker
> resolves things, link failure occurs.  The proper solution is not to tiptoe
> around the linker; it's to remove main() from the library.
> 
> If you want to skip to the important stuff, see patches 11-14. All the other
> patches are just prerequisite cleanups that prepare for those last 4.
> 
> This series taks a few detours, cleans out the closet, and reorganizes your
> kitchen junk drawer.  Often, you must clean up the house before remodeling it.
> I feel that all the little detours were needed and that Piglit really benefits
> from them. I wanted to clean up a lot more, but I restrained myself only to
> the cleanups that directly benefited the series' stated goal.
> 
> No regresssions found on Sandybridge.
> 
> [1] See points 5 and 6 in in
>     http://www.mail-archive.com/piglit@lists.freedesktop.org/msg00239.html.

Sorry for the huge delay in finishing the review...totally got sidetracked.

This looks great.  Really glad to see this happen.

For the series:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the Piglit mailing list