[Piglit] [PATCH] shader_runner: print link error even when link failure expected

Tapani Pälli tapani.palli at intel.com
Mon Nov 9 22:31:14 PST 2015


Makes sense, we've had cases where negative test passes because 
something else failed;

Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

On 11/10/2015 04:49 AM, Timothy Arceri wrote:
> From: Timothy Arceri <timothy.arceri at collabora.com>
>
> This makes it much easier to be sure the tests you are writting/running
> are failing for the correct reason.
>
> This also matches the behaviour of the glslparsertest tool.
> ---
>   tests/shaders/shader_runner.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
> index b010cbb..9308905 100644
> --- a/tests/shaders/shader_runner.c
> +++ b/tests/shaders/shader_runner.c
> @@ -3060,6 +3060,8 @@ piglit_display(void)
>   			if (link_ok) {
>   				printf("shader link error expected, but it was successful!\n");
>   				piglit_report_result(PIGLIT_FAIL);
> +			} else {
> +				fprintf(stderr, "Failed to link:\n%s\n", prog_err_info);
>   			}
>   		} else if (string_match("link success", line)) {
>   			program_must_be_in_use();
>


More information about the Piglit mailing list