<div dir="ltr">On 21 October 2013 16:55, Chad Versace <span dir="ltr"><<a href="mailto:chad.versace@linux.intel.com" target="_blank">chad.versace@linux.intel.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 10/21/2013 11:29 AM, Paul Berry wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 15 October 2013 17:32, Ian Romanick <<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com" target="_blank">ian.d.romanick@intel.com</a>><br>
</blockquote></blockquote>
<br>
<br>
<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

@@ -43,6 +43,20 @@ enum piglit_gl_visual {<br>
  };<br>
<br>
  /**<br>
+ * An idividual subtest that makes up part of a test group.<br>
+ */<br>
+struct piglit_gl_subtest {<br>
+       /** Name of the subtest as it will appear in the log. */<br>
+       const char *name;<br>
+<br>
+       /** Command line name used to select this test. */<br>
+       const char *option;<br>
+<br>
+       /** Function that implements the test. */<br>
+       enum piglit_result (*subtest_func)(void);<br>
<br>
</blockquote>
<br>
Would you have any objection to adding a void * to this structure, which<br>
would then get passed to subtest_func?  That would give the test<br>
implementor extra flexibility if they want to share a single subtest_func<br>
between multiple similar subtests.  It would also allow for the possibility<br>
that the set of available subtests is determined at run time rather than<br>
compile time.<br>
</blockquote>
<br></div>
I second Paul's request to add a void* parameter.<br>
<br>
However, I don't see how the presence of a void* parameter enables a test<br>
to determine the list of available subtests at runtime. A test can already<br>
do that at runtime by generating piglit_gl_test_config::<u></u>subtests in main().<br>
Nothing requires that the test declare that structure statically.<br>
<br>
</blockquote></div><br></div><div class="gmail_extra">Technically you're right, but without a void * parameter to subtest_func(), it can only generate subtests that are drawn from a fixed set of possibilities that's determined at compile-time, since the only way for the tests to be different from each other is by using different function pointers, and the set of functions available is fixed at compile time.</div>
</div>