]> granicus.if.org Git - libevent/commitdiff
test/regress: add simplestsignal: to track reorder bugs separately
authorAzat Khuzhin <a3at.mail@gmail.com>
Sat, 22 Feb 2014 22:31:51 +0000 (02:31 +0400)
committerAzat Khuzhin <a3at.mail@gmail.com>
Sun, 29 Jun 2014 13:39:33 +0000 (17:39 +0400)
test/regress.c

index 4d17b6780b0437c13b9efa225d583d13aeefc322..a1094abfa04e47964c8e3739b0db05bfacdaa3ae 100644 (file)
@@ -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),