tests: Use ge instead of eq when testing version and caps

This gets us passing at least for now. Some of these tests
should be upgraded to the new version instead.

Signed-off-by: Jakob Bornecrantz <jakob.bornecrantz@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Jakob Bornecrantz 7 years ago committed by Dave Airlie
parent 9dc4864e1a
commit b03d30e6d1
  1. 8
      tests/test_virgl_init.c
  2. 4
      tests/testvirgl.c

@ -280,9 +280,9 @@ START_TEST(virgl_init_get_caps_set1)
ck_assert_int_eq(ret, 0); ck_assert_int_eq(ret, 0);
virgl_renderer_get_cap_set(1, &max_ver, &max_size); virgl_renderer_get_cap_set(1, &max_ver, &max_size);
ck_assert_int_eq(max_ver, 1); ck_assert_int_ge(max_ver, 1);
ck_assert_int_ne(max_size, 0); ck_assert_int_ne(max_size, 0);
ck_assert_int_eq(max_size, sizeof(struct virgl_caps_v1)); ck_assert_int_ge(max_size, sizeof(struct virgl_caps_v1));
caps = malloc(max_size); caps = malloc(max_size);
@ -303,9 +303,9 @@ START_TEST(virgl_init_get_caps_null)
ck_assert_int_eq(ret, 0); ck_assert_int_eq(ret, 0);
virgl_renderer_get_cap_set(1, &max_ver, &max_size); virgl_renderer_get_cap_set(1, &max_ver, &max_size);
ck_assert_int_eq(max_ver, 1); ck_assert_int_ge(max_ver, 1);
ck_assert_int_ne(max_size, 0); ck_assert_int_ne(max_size, 0);
ck_assert_int_eq(max_size, sizeof(struct virgl_caps_v1)); ck_assert_int_ge(max_size, sizeof(struct virgl_caps_v1));
virgl_renderer_fill_caps(0, 0, NULL); virgl_renderer_fill_caps(0, 0, NULL);

@ -273,9 +273,9 @@ static void *get_caps(void)
void *caps; void *caps;
virgl_renderer_get_cap_set(1, &max_ver, &max_size); virgl_renderer_get_cap_set(1, &max_ver, &max_size);
ck_assert_int_eq(max_ver, 1); ck_assert_int_ge(max_ver, 1);
ck_assert_int_ne(max_size, 0); ck_assert_int_ne(max_size, 0);
ck_assert_int_eq(max_size, sizeof(struct virgl_caps_v1)); ck_assert_int_ge(max_size, sizeof(struct virgl_caps_v1));
caps = malloc(max_size); caps = malloc(max_size);
virgl_renderer_fill_caps(0, 0, caps); virgl_renderer_fill_caps(0, 0, caps);

Loading…
Cancel
Save