Commit bbbdff88 authored by Marek Chalupa's avatar Marek Chalupa Committed by Pekka Paalanen

tests: use test_set_timeout in display-test

replace call to alarm() with test_set_timeout()
Signed-off-by: default avatarMarek Chalupa <mchqwerty@gmail.com>
Acked-by: default avatarGiulio Camuffo <giuliocamuffo@gmail.com>
parent 1d2ef9ee
......@@ -410,7 +410,7 @@ threading_post_err(void)
/* kill test in 3 seconds. This should be enough time for the
* thread to exit if it's not blocking. If everything is OK, than
* the thread was woken up and the test will end before the SIGALRM */
alarm(3);
test_set_timeout(3);
pthread_join(thread, NULL);
wl_proxy_destroy((struct wl_proxy *) c->tc);
......@@ -462,7 +462,7 @@ threading_cancel_read(void)
/* kill test in 3 seconds. This should be enough time for the
* thread to exit if it's not blocking. If everything is OK, than
* the thread was woken up and the test will end before the SIGALRM */
alarm(3);
test_set_timeout(3);
pthread_join(th1, NULL);
pthread_join(th2, NULL);
pthread_join(th3, NULL);
......@@ -501,7 +501,7 @@ threading_read_eagain(void)
* set it - check if we're testing the right case */
assert(errno == EAGAIN);
alarm(3);
test_set_timeout(3);
pthread_join(th1, NULL);
pthread_join(th2, NULL);
pthread_join(th3, NULL);
......@@ -562,7 +562,7 @@ threading_read_after_error(void)
assert(wl_display_read_events(c->wl_display) == -1);
/* kill test in 3 seconds */
alarm(3);
test_set_timeout(3);
pthread_join(thread, NULL);
wl_proxy_destroy((struct wl_proxy *) c->tc);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment