diff options
| author | Marek Chalupa <mchqwerty@gmail.com> | 2014-09-24 14:37:07 +0200 |
|---|---|---|
| committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2014-11-17 16:58:31 +0200 |
| commit | bbbdff88b1d90cd9f843aab3c06f02dada3741ad (patch) | |
| tree | d380bdc8378f278519dcc9161316ee3240ead45c /tests/display-test.c | |
| parent | tests: add timeout tests (diff) | |
| download | wayland-bbbdff88b1d90cd9f843aab3c06f02dada3741ad.tar wayland-bbbdff88b1d90cd9f843aab3c06f02dada3741ad.tar.gz wayland-bbbdff88b1d90cd9f843aab3c06f02dada3741ad.tar.bz2 wayland-bbbdff88b1d90cd9f843aab3c06f02dada3741ad.tar.lz wayland-bbbdff88b1d90cd9f843aab3c06f02dada3741ad.tar.xz wayland-bbbdff88b1d90cd9f843aab3c06f02dada3741ad.tar.zst wayland-bbbdff88b1d90cd9f843aab3c06f02dada3741ad.zip | |
tests: use test_set_timeout in display-test
replace call to alarm() with test_set_timeout()
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Acked-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Diffstat (limited to 'tests/display-test.c')
| -rw-r--r-- | tests/display-test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/display-test.c b/tests/display-test.c index f8aac64..aecf341 100644 --- a/tests/display-test.c +++ b/tests/display-test.c @@ -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); |
