summaryrefslogtreecommitdiff
path: root/tests/egl
diff options
context:
space:
mode:
authorDaniel Kurtz <djkurtz@chromium.org>2014-10-15 19:16:25 +0800
committerMarek Olšák <marek.olsak@amd.com>2015-04-22 14:03:28 +0200
commit455c36722337b6c736ff763af82588f4b5386122 (patch)
tree239ded47cd1b99747f2cae736f7f9368e8b9ca38 /tests/egl
parent9500745f79cd7561cfd05560e29123fda74074b4 (diff)
egl_khr_fence_sync: allow skipping display_bound_in_other_thread subtest
This test strives to avoid false passes, but misses an important one: If either thread cannot create a second display it will return PIGLIT_SKIP. However, piglit_merge_result(PASS, SKIP) or piglit_merge_result(SKIP, PASS) throws away the SKIP and returns PASS. For this test, we really want to return SKIP if either thread returns SKIP. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'tests/egl')
-rw-r--r--tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c b/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c
index 4fb1ccd1a..e6447bc4e 100644
--- a/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c
+++ b/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c
@@ -1199,7 +1199,7 @@ cleanup:
static enum piglit_result
test_eglCreateSyncKHR_with_display_bound_in_other_thread(void *test_data)
{
- enum piglit_result result = PIGLIT_PASS;
+ enum piglit_result result;
enum piglit_result *t2_result = NULL;
bool orig_print_tid;
pthread_t thread2;
@@ -1236,7 +1236,15 @@ test_eglCreateSyncKHR_with_display_bound_in_other_thread(void *test_data)
}
if (t2_result) {
- piglit_merge_result(&result, *t2_result);
+ /*
+ * If either thread SKIPs, then SKIP the test.
+ * Otherwise do a merge to return possible ERROR/WARN.
+ */
+ if ((result == PIGLIT_PASS && *t2_result == PIGLIT_SKIP) ||
+ (result == PIGLIT_SKIP && *t2_result == PIGLIT_PASS))
+ result = PIGLIT_SKIP;
+ else
+ piglit_merge_result(&result, *t2_result);
} else {
piglit_loge("thread %"PRIuMAX" returned no piglit_result",
(uintmax_t) thread2);