test-ioloop.c revision a071ae737f338f94d2e72c54930b51a1dc336815
/* Copyright (c) 2015 Dovecot authors, see the included COPYING file */
#include "test-lib.h"
#include "net.h"
#include "time-util.h"
#include "ioloop.h"
#include <unistd.h>
{
i_fatal("gettimeofday() failed: %m");
}
static void test_ioloop_timeout(void)
{
test_begin("ioloop timeout");
ioloop = io_loop_create();
/* add a timeout by moving it from another ioloop */
ioloop2 = io_loop_create();
sleep(1);
/* add & remove immediately */
timeout_remove(&to);
/* add the timeout we're actually testing below */
i_fatal("gettimeofday() failed: %m");
timeout_remove(&to);
test_end();
}
{
}
static void test_ioloop_find_fd_conditions(void)
{
struct {
enum io_condition condition;
int fd[2];
} tests[] = {
};
unsigned int i;
test_begin("ioloop find fd conditions");
ioloop = io_loop_create();
for (i = 0; i < N_ELEMENTS(tests); i++) {
i_fatal("socketpair() failed: %m");
}
for (i = 0; i < N_ELEMENTS(tests); i++)
for (i = 0; i < N_ELEMENTS(tests); i++) {
}
test_end();
}
void test_ioloop(void)
{
}