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

Chad Versace chad.versace at linux.intel.com
Wed Jun 13 10:25:13 PDT 2012


On 06/13/2012 09:06 AM, Brian Paul wrote:
> On 06/12/2012 05: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.
> 
> Could you check this into a branch first for additional testing (MSVC, mingw32, etc)?

Sure. The series is on my separate-main-v11 branch. I will be posting a v12, v13, etc
as I incorporate review comments.

Did you also want the series checked into a branch in the origin repo?

----
Chad Versace
chad.versace at linux.intel.com




More information about the Piglit mailing list