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

Alexandros Frantzis alexandros.frantzis at collabora.com
Tue Jul 10 10:19:19 UTC 2018


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>
---
 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



More information about the virglrenderer-devel mailing list