From b897beff6aadf67f034cef2865629d94ca87ce4c Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 23 Feb 2014 02:31:51 +0400 Subject: [PATCH] test/regress: add simplestsignal: to track reorder bugs separately --- test/regress.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/test/regress.c b/test/regress.c index 4d17b678..a1094abf 100644 --- a/test/regress.c +++ b/test/regress.c @@ -944,17 +944,18 @@ signal_cb(evutil_socket_t fd, short event, void *arg) } static void -test_simplesignal(void) +test_simplesignal_impl(int find_reorder) { struct event ev; struct itimerval itv; - setup_test("Simple signal: "); evsignal_set(&ev, SIGALRM, signal_cb, &ev); evsignal_add(&ev, NULL); /* find bugs in which operations are re-ordered */ - evsignal_del(&ev); - evsignal_add(&ev, NULL); + if (find_reorder) { + evsignal_del(&ev); + evsignal_add(&ev, NULL); + } memset(&itv, 0, sizeof(itv)); itv.it_value.tv_sec = 0; @@ -970,6 +971,20 @@ test_simplesignal(void) cleanup_test(); } +static void +test_simplestsignal(void) +{ + setup_test("Simplest one signal: "); + test_simplesignal_impl(0); +} + +static void +test_simplesignal(void) +{ + setup_test("Simple signal: "); + test_simplesignal_impl(1); +} + static void test_multiplesignal(void) { @@ -3294,6 +3309,7 @@ struct testcase_t evtag_testcases[] = { struct testcase_t signal_testcases[] = { #ifndef _WIN32 + LEGACY(simplestsignal, TT_ISOLATED), LEGACY(simplesignal, TT_ISOLATED), LEGACY(multiplesignal, TT_ISOLATED), LEGACY(immediatesignal, TT_ISOLATED), -- 2.40.0