tevent test select HACKS
authorStefan Metzmacher <metze@samba.org>
Mon, 18 Jul 2011 07:15:21 +0000 (09:15 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 18 Jul 2011 07:16:32 +0000 (09:16 +0200)
lib/tevent/testsuite.c

index 924e0656b2659258ca469a4f2d9a0763c1ab97a1..fda79d17c5f03309d1483447af40c54d4982b83f 100644 (file)
@@ -272,6 +272,7 @@ static void test_fde_flags_next_state(struct test_fde_flags_state *state)
         * something to read and the socket was closed.
         */
        case 17:
+               n = read(state->fd[0], &byte, 1);
                close(state->fd[0]);
                state->fd[0] = -1;
                TEVENT_FD_WANTERROR(state->fde);
@@ -309,7 +310,7 @@ static void test_fde_flags_next_state(struct test_fde_flags_state *state)
         * socket is closed.
         */
        case 23:
-               n = read(state->fd[0], &byte, 1);
+               //n = read(state->fd[0], &byte, 1);
 //TODOtorture_assert_int_equal_goto
 
                TEVENT_FD_WANTERROR(state->fde);
@@ -347,7 +348,7 @@ static void test_fde_flags_next_state(struct test_fde_flags_state *state)
         * read the EOF from the socket.
         */
        case 29:
-               n = read(state->fd[0], &byte, 1);
+               //n = read(state->fd[0], &byte, 1);
 //TODOtorture_assert_int_equal_goto
 
                TEVENT_FD_WANTERROR(state->fde);
@@ -521,17 +522,21 @@ static bool test_fde_flags(struct torture_context *tctx,
 
        return true;
 }
-
+#include "lib/util/util.h"
 struct torture_suite *torture_local_event(TALLOC_CTX *mem_ctx)
 {
        struct torture_suite *suite = torture_suite_create(mem_ctx, "event");
        const char **list = event_backend_list(suite);
        int i;
 
+       list = str_list_make(suite, "select", NULL);
+
        for (i=0;list && list[i];i++) {
+#if 0
                torture_suite_add_simple_tcase_const(suite, list[i],
                                               test_event_context,
                                               (const void *)list[i]);
+#endif
                torture_suite_add_simple_tcase_const(suite, list[i],
                                               test_fde_flags,
                                               (const void *)list[i]);