<div dir="ltr">Although my patch is incorrect, the code here is not right either.<div><br></div><div>See piglit-util-gl.h:</div><div><br></div><div><div>113 /**</div><div>114 * \brief Check for unexpected GL errors.</div><div>115 *</div><div>116 * If glGetError() returns an error other than \c expected_error, then</div><div>117 * print a diagnostic and return GL_FALSE. Otherwise return GL_TRUE.</div><div>118 */</div><div>119 GLboolean</div><div>120 piglit_check_gl_error_(GLenum expected_error, const char *file, unsigned line);</div></div><div><br></div><div>This function returns GL_FALSE in case of an error, and GL_TRUE in case of no errors.</div><div><br></div><div>Therefore it should be</div><div><br></div><div>got_error = !piglit_check_gl_error(0);</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 14, 2016 at 1:17 PM, Haixia Shi <span dir="ltr"><<a href="mailto:hshi@chromium.org" target="_blank">hshi@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Dylan<div><br></div><div>Sorry about that. You're correct and I did misread this "if" statement.</div><div><br></div><div>Please consider this patch abandoned.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 14, 2016 at 11:56 AM, Dylan Baker <span dir="ltr"><<a href="mailto:baker.dylan.c@gmail.com" target="_blank">baker.dylan.c@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Quoting Haixia Shi (2016-04-14 11:11:25)<br>
<div><div>> The variable "pass" is incorrectly set to false unconditionally. This<br>
> prevents the test from ever passing.<br>
><br>
> Signed-off-by: Haixia Shi <<a href="mailto:hshi@chromium.org" target="_blank">hshi@chromium.org</a>><br>
> ---<br>
> tests/spec/arb_get_program_binary/retrievable_hint.c | 2 +-<br>
> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
><br>
> diff --git a/tests/spec/arb_get_program_binary/retrievable_hint.c b/tests/spec/arb_get_program_binary/retrievable_hint.c<br>
> index 8283c5b..4b9264c 100644<br>
> --- a/tests/spec/arb_get_program_binary/retrievable_hint.c<br>
> +++ b/tests/spec/arb_get_program_binary/retrievable_hint.c<br>
> @@ -97,7 +97,7 @@ piglit_init(int argc, char **argv)<br>
> pass = false;<br>
> }<br>
> } else<br>
> - pass = false;<br>
> + pass = true;<br>
><br>
> /* The ARB_get_program_binary spec says:<br>
> *<br>
> --<br>
> 2.8.0.rc3.226.g39d4020<br>
><br>
</div></div>> _______________________________________________<br>
> Piglit mailing list<br>
> <a href="mailto:Piglit@lists.freedesktop.org" target="_blank">Piglit@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/piglit" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
<br>
Hi,<br>
<br>
I don't think this patch is correct. The context doesn't show it, but<br>
this else case is the else of '!got_error', which means pass is set to<br>
false when there is an error.<br>
<br>
I've CC'd Ian (who wrote the test). Maybe he knows better.<br>
<span><font color="#888888"><br>
Dylan<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>