[Piglit] [PATCH 1/2] arb_color_buffer_float/render: refactor code for easier debugging

Eric Anholt eric at anholt.net
Sat Oct 1 21:03:29 PDT 2011


On Wed, 28 Sep 2011 14:13:14 -0600, Brian Paul <brianp at vmware.com> wrote:
> If you have to debug a failing case in this test it's now a simple
> matter to add a new call to test_one() passing just the parameters
> you're interested in.
> +		if (pass) {
> +			npass++;
>  		}
> -		if (test_fog && fpmode)
> -		{
> -			//printf("Unclear specification on GL_ARB_fog_*\n");
> -			opass = GL_TRUE;
> +		else {
> +			printf("Re-running failed test\n");
> +			pass = test_one(vert_clamp, frag_clamp, semantic,
> +					blend, logicop, vpmode, fpmode);
>  		}
>  
> -		if (!opass) {
> -			printf("%s: %s\n", (cpass ? "PASS" : (opass ? "XFAIL" : "FAIL")), test_name);
> -			printf("  Expected: %f %f %f %f\n", expected[0], expected[1], expected[2], expected[3]);
> -			printf("  Observed: %f %f %f %f\n", probe[0], probe[1], probe[2], probe[3]);
> -
> -		} else {
> -			npass++;
> -		}
>  		total++;
>  
> -		pass = opass && pass;
> +		all_pass = all_pass && pass;
>  	}
>  
>  	printf("Summary: %i/%i passed.\n", npass, total);
> -	return pass;
> +	return all_pass;

So, if the test intermittently fails, we'll end up not reporting that as
failure if it's not immediately reproduced?  That seems bad.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20111001/23efe347/attachment.pgp>


More information about the Piglit mailing list