[virglrenderer-devel] [PATCH 1/8] tests: Use ge instead of eq when testing version and caps
Jakob Bornecrantz
jakob.bornecrantz at collabora.com
Tue Feb 13 14:27:23 UTC 2018
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 at collabora.com>
---
tests/test_virgl_init.c | 8 ++++----
tests/testvirgl.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/test_virgl_init.c b/tests/test_virgl_init.c
index f568e8b..a30cc05 100644
--- a/tests/test_virgl_init.c
+++ b/tests/test_virgl_init.c
@@ -280,9 +280,9 @@ START_TEST(virgl_init_get_caps_set1)
ck_assert_int_eq(ret, 0);
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_eq(max_size, sizeof(struct virgl_caps_v1));
+ ck_assert_int_ge(max_size, sizeof(struct virgl_caps_v1));
caps = malloc(max_size);
@@ -303,9 +303,9 @@ START_TEST(virgl_init_get_caps_null)
ck_assert_int_eq(ret, 0);
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_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);
diff --git a/tests/testvirgl.c b/tests/testvirgl.c
index b1f77f0..f4ae92d 100644
--- a/tests/testvirgl.c
+++ b/tests/testvirgl.c
@@ -273,9 +273,9 @@ static void *get_caps(void)
void *caps;
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_eq(max_size, sizeof(struct virgl_caps_v1));
+ ck_assert_int_ge(max_size, sizeof(struct virgl_caps_v1));
caps = malloc(max_size);
virgl_renderer_fill_caps(0, 0, caps);
--
2.14.1
More information about the virglrenderer-devel
mailing list