9 static int setup(void **state)
11 torture_setup_socket_dir(state);
16 static int teardown(void **state)
18 torture_teardown_socket_dir(state);
23 static void test_close_failure(void **state)
27 (void) state; /* unused */
29 s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
31 assert_int_not_equal(s, -1);
33 /* Do not close the socket here so that destructor
34 * handles it and no hang should be observed.*/
40 const struct CMUnitTest close_failure_tests[] = {
41 cmocka_unit_test_setup_teardown(test_close_failure,
45 rc = cmocka_run_group_tests(close_failure_tests, NULL, NULL);