On 24 February 2012 11:43, Chad Versace <span dir="ltr">&lt;<a href="mailto:chad.versace@linux.intel.com">chad.versace@linux.intel.com</a>&gt;</span> wrote:<br><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 02/22/2012 01:29 PM, Paul Berry wrote:<br>
&gt; This patch converts the following tests to use the main() function in<br>
&gt; piglit-framework.c rather than define their own main() function.<br>
&gt;<br>
&gt; - asmparsertest<br>
&gt; - fdo14575<br>
&gt; - fdo20701<br>
&gt; - fdo22540<br>
&gt; - fdo31934<br>
&gt; - glslparsertest<br>
&gt; - texunits<br>
&gt; ---<br>
&gt;  tests/asmparsertest/asmparsertest.c   |   44 +++++++----------<br>
&gt;  tests/bugs/fdo14575.c                 |   29 ++++-------<br>
&gt;  tests/bugs/fdo20701.c                 |   53 ++++-----------------<br>
&gt;  tests/bugs/fdo22540.c                 |   31 +++---------<br>
&gt;  tests/bugs/fdo31934.c                 |   25 ++++------<br>
&gt;  tests/general/texunits.c              |   84 +++++++--------------------------<br>
&gt;  tests/glslparsertest/glslparsertest.c |   23 ++++-----<br>
&gt;  7 files changed, 87 insertions(+), 202 deletions(-)<br>
&gt;<br>
<br>
<br>
<br>
</div><div class="im">&gt; diff --git a/tests/bugs/fdo20701.c b/tests/bugs/fdo20701.c<br>
&gt; index 279de10..6bab980 100644<br>
&gt; --- a/tests/bugs/fdo20701.c<br>
&gt; +++ b/tests/bugs/fdo20701.c<br>
&gt; @@ -36,12 +36,14 @@<br>
&gt;<br>
<br>
</div><div class="im">&gt; @@ -81,8 +61,6 @@ init(void)<br>
&gt;  {<br>
&gt;       GLenum status;<br>
&gt;<br>
&gt; -     glewInit();<br>
&gt; -<br>
&gt;       piglit_require_extension(&quot;GL_EXT_framebuffer_object&quot;);<br>
&gt;<br>
&gt;       glGenFramebuffersEXT(1, &amp;fb);<br>
&gt; @@ -110,20 +88,7 @@ init(void)<br>
&gt;  }<br>
&gt;<br>
&gt;<br>
&gt; -int main(int argc, char**argv)<br>
&gt; +void<br>
&gt; +piglit_init(int argc, char**argv)<br>
&gt;  {<br>
&gt; -     glutInit(&amp;argc, argv);<br>
&gt; -     if (argc == 2 &amp;&amp; !strcmp(argv[1], &quot;-auto&quot;))<br>
&gt; -             Automatic = 1;<br>
&gt; -     glutInitDisplayMode(GLUT_RGB);<br>
&gt; -     glutInitWindowSize(Width, Height);<br>
&gt; -     glutCreateWindow(&quot;FD.O bug #20701 test&quot;);<br>
&gt; -     glutReshapeFunc(Reshape);<br>
&gt; -     glutKeyboardFunc(Key);<br>
&gt; -     glutDisplayFunc(Display);<br>
&gt; -     if (!Automatic)<br>
&gt; -             printf(&quot;If the test doesn&#39;t crash, then it passes.\n&quot;);<br>
&gt; -     init();<br>
&gt; -     glutMainLoop();<br>
&gt; -     return 0;<br>
&gt;  }<br>
<br>
</div>In fdo20701.c, init() no longer gets called. It needs to be renamed to piglit_init().<br></blockquote><div><br>Whoops.  Good catch.  I&#39;m not sure how I missed that.<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<br>
Other than that, this is<br>
Reviewed-by: Chad Versace &lt;<a href="mailto:chad.versace@linux.intel.com">chad.versace@linux.intel.com</a>&gt;<br>
</blockquote></div><br>