diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-09-27 23:15:53 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-01-14 11:17:09 -0500 |
commit | 7a63005220938b30df41b51334942d7d79c14cf9 (patch) | |
tree | e1d3671a8d7a7cd195c7a4b307f2c7288b9211f3 /src/test/test_util.c | |
parent | e47a90a976f883571bea6e58620aa13f058873e3 (diff) | |
download | tor-7a63005220938b30df41b51334942d7d79c14cf9.tar.gz tor-7a63005220938b30df41b51334942d7d79c14cf9.zip |
Basic unit test for condition variables.
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r-- | src/test/test_util.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index b4ee934698..97cf3870f4 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -4646,23 +4646,6 @@ test_util_socket(void *arg) tor_close_socket(fd4); } -static void * -socketpair_test_setup(const struct testcase_t *testcase) -{ - return testcase->setup_data; -} -static int -socketpair_test_cleanup(const struct testcase_t *testcase, void *ptr) -{ - (void)testcase; - (void)ptr; - return 1; -} - -static const struct testcase_setup_t socketpair_setup = { - socketpair_test_setup, socketpair_test_cleanup -}; - /* Test for socketpair and ersatz_socketpair(). We test them both, since * the latter is a tolerably good way to exersize tor_accept_socket(). */ static void @@ -4837,10 +4820,10 @@ struct testcase_t util_tests[] = { UTIL_TEST(mathlog, 0), UTIL_TEST(weak_random, 0), UTIL_TEST(socket, TT_FORK), - { "socketpair", test_util_socketpair, TT_FORK, &socketpair_setup, + { "socketpair", test_util_socketpair, TT_FORK, &passthrough_setup, (void*)"0" }, { "socketpair_ersatz", test_util_socketpair, TT_FORK, - &socketpair_setup, (void*)"1" }, + &passthrough_setup, (void*)"1" }, UTIL_TEST(max_mem, 0), UTIL_TEST(hostname_validation, 0), UTIL_TEST(ipv4_validation, 0), |