tests: Fix virgl_init_cbs_wrong_ver test

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@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
macos/master
Alexandros Frantzis 7 years ago committed by Dave Airlie
parent 79479ac982
commit 5057fb9b05
  1. 2
      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);
}

Loading…
Cancel
Save