[virglrenderer-devel] [PATCH] tests: Fix virgl_init_cbs_wrong_ver test

Elie Tournier tournier.elie at gmail.com
Thu Jul 19 14:56:48 UTC 2018


On Tue, Jul 10, 2018 at 01:19:19PM +0300, Alexandros Frantzis wrote:
> We now support version 2 of the virgl_renderer_callbacks struct, so
> update the test to check for an unsupported version. Use
> VIRGL_RENDERER_CALLBACKS_VERSION + 1 as the test version to ensure we
> don't fail this test again when we update the struct in the future.
> 
> Fixes: test_virgl_init.virgl_init_cbs_wrong_ver
> 
> Signed-off-by: Alexandros Frantzis <alexandros.frantzis at collabora.com>
Thanks a lot.
Reviewed-by: Elie Tournier <elie.tournier at collabora.com>
> ---
>  tests/test_virgl_init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/test_virgl_init.c b/tests/test_virgl_init.c
> index a30cc05..e777810 100644
> --- a/tests/test_virgl_init.c
> +++ b/tests/test_virgl_init.c
> @@ -64,7 +64,7 @@ START_TEST(virgl_init_cbs_wrong_ver)
>    int ret;
>    struct virgl_renderer_callbacks testcbs;
>    memset(&testcbs, 0, sizeof(testcbs));
> -  testcbs.version = 2;
> +  testcbs.version = VIRGL_RENDERER_CALLBACKS_VERSION + 1;
>    ret = virgl_renderer_init(&mystruct, 0, &testcbs);
>    ck_assert_int_eq(ret, -1);
>  }
> -- 
> 2.17.1
> 
> _______________________________________________
> virglrenderer-devel mailing list
> virglrenderer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/virglrenderer-devel


More information about the virglrenderer-devel mailing list