aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/include.am18
-rw-r--r--src/test/test_workqueue.c3
-rwxr-xr-xsrc/test/test_workqueue_cancel.sh4
-rwxr-xr-xsrc/test/test_workqueue_efd.sh4
-rwxr-xr-xsrc/test/test_workqueue_efd2.sh4
-rwxr-xr-xsrc/test/test_workqueue_pipe.sh4
-rwxr-xr-xsrc/test/test_workqueue_pipe2.sh4
-rwxr-xr-xsrc/test/test_workqueue_socketpair.sh4
8 files changed, 43 insertions, 2 deletions
diff --git a/src/test/include.am b/src/test/include.am
index fa660f5302..5a91c74cde 100644
--- a/src/test/include.am
+++ b/src/test/include.am
@@ -9,6 +9,12 @@ TESTS_ENVIRONMENT = \
export TESTING_TOR_BINARY="$(TESTING_TOR_BINARY)";
TESTSCRIPTS = src/test/test_zero_length_keys.sh \
+ src/test/test_workqueue_cancel.sh \
+ src/test/test_workqueue_efd.sh \
+ src/test/test_workqueue_efd2.sh \
+ src/test/test_workqueue_pipe.sh \
+ src/test/test_workqueue_pipe2.sh \
+ src/test/test_workqueue_socketpair.sh \
src/test/test_switch_id.sh
if USEPYTHON
@@ -16,7 +22,8 @@ TESTSCRIPTS += src/test/test_ntor.sh src/test/test_bt.sh
endif
TESTS += src/test/test src/test/test-slow src/test/test-memwipe \
- src/test/test_workqueue src/test/test_keygen.sh \
+ src/test/test_workqueue \
+ src/test/test_keygen.sh \
src/test/test-timers \
$(TESTSCRIPTS)
@@ -257,4 +264,11 @@ EXTRA_DIST += \
src/test/test_zero_length_keys.sh \
src/test/test_ntor.sh src/test/test_bt.sh \
src/test/test-network.sh \
- src/test/test_switch_id.sh
+ src/test/test_switch_id.sh \
+ src/test/test_workqueue_cancel.sh \
+ src/test/test_workqueue_efd.sh \
+ src/test/test_workqueue_efd2.sh \
+ src/test/test_workqueue_pipe.sh \
+ src/test/test_workqueue_pipe2.sh \
+ src/test/test_workqueue_socketpair.sh
+
diff --git a/src/test/test_workqueue.c b/src/test/test_workqueue.c
index cbcf596b22..75d68a7ce0 100644
--- a/src/test/test_workqueue.c
+++ b/src/test/test_workqueue.c
@@ -400,6 +400,9 @@ main(int argc, char **argv)
}
rq = replyqueue_new(as_flags);
+ if (as_flags && rq == NULL)
+ return 77; // 77 means "skipped".
+
tor_assert(rq);
tp = threadpool_new(opt_n_threads,
rq, new_state, free_state, NULL);
diff --git a/src/test/test_workqueue_cancel.sh b/src/test/test_workqueue_cancel.sh
new file mode 100755
index 0000000000..f7c663171e
--- /dev/null
+++ b/src/test/test_workqueue_cancel.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+${builddir:-.}/src/test/test_workqueue -C 1
+
diff --git a/src/test/test_workqueue_efd.sh b/src/test/test_workqueue_efd.sh
new file mode 100755
index 0000000000..4d89396819
--- /dev/null
+++ b/src/test/test_workqueue_efd.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+${builddir:-.}/src/test/test_workqueue \
+ --no-eventfd2 --no-pipe2 --no-pipe --no-socketpair
diff --git a/src/test/test_workqueue_efd2.sh b/src/test/test_workqueue_efd2.sh
new file mode 100755
index 0000000000..7cfff45ff3
--- /dev/null
+++ b/src/test/test_workqueue_efd2.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+${builddir:-.}/src/test/test_workqueue \
+ --no-eventfd --no-pipe2 --no-pipe --no-socketpair
diff --git a/src/test/test_workqueue_pipe.sh b/src/test/test_workqueue_pipe.sh
new file mode 100755
index 0000000000..afcef87853
--- /dev/null
+++ b/src/test/test_workqueue_pipe.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+${builddir:-.}/src/test/test_workqueue \
+ --no-eventfd2 --no-eventfd --no-pipe2 --no-socketpair
diff --git a/src/test/test_workqueue_pipe2.sh b/src/test/test_workqueue_pipe2.sh
new file mode 100755
index 0000000000..a20a1427e0
--- /dev/null
+++ b/src/test/test_workqueue_pipe2.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+${builddir:-.}/src/test/test_workqueue \
+ --no-eventfd2 --no-eventfd --no-pipe --no-socketpair
diff --git a/src/test/test_workqueue_socketpair.sh b/src/test/test_workqueue_socketpair.sh
new file mode 100755
index 0000000000..76af79746d
--- /dev/null
+++ b/src/test/test_workqueue_socketpair.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+${builddir:-.}/src/test/test_workqueue \
+ --no-eventfd2 --no-eventfd --no-pipe2 --no-pipe