diff --git a/oio-unix.c b/oio-unix.c index 1c4326b5..d2549013 100644 --- a/oio-unix.c +++ b/oio-unix.c @@ -502,6 +502,11 @@ int oio_write2(oio_req* req, const char* msg) { } +int oio_timeout(oio_req *req, int64_t timeout) { + return -1; +} + + int oio_read(oio_req *req, oio_buf* bufs, int bufcnt) { oio_handle* handle = req->handle; ssize_t nread = -1; diff --git a/test/test-list.h b/test/test-list.h index 9a81910c..7c898536 100644 --- a/test/test-list.h +++ b/test/test-list.h @@ -1,7 +1,7 @@ TEST_DECLARE (echo_server) TEST_DECLARE (ping_pong) -TEST_DECLARE (close_cb_stack); -TEST_DECLARE (timeout); +TEST_DECLARE (close_cb_stack) +TEST_DECLARE (timeout) TEST_DECLARE (fail_always) TEST_DECLARE (pass_always) diff --git a/test/test-runner.h b/test/test-runner.h index 83ca7c53..b25d9d0a 100644 --- a/test/test-runner.h +++ b/test/test-runner.h @@ -1,4 +1,3 @@ - #ifndef TEST_RUNNER_H_ #define TEST_RUNNER_H_ diff --git a/test/test-timeout.c b/test/test-timeout.c index 5fc51305..aad2c056 100644 --- a/test/test-timeout.c +++ b/test/test-timeout.c @@ -2,23 +2,23 @@ #include "test.h" -int expected = 0; -int timeouts = 0; +static int expected = 0; +static int timeouts = 0; -void timeout_cb(oio_req *req) { +static void timeout_cb(oio_req *req) { ASSERT(req != NULL); free(req); timeouts++; } -void exit_timeout_cb(oio_req *req) { +static void exit_timeout_cb(oio_req *req) { ASSERT(req != NULL); ASSERT(timeouts == expected); exit(0); } -void dummy_timeout_cb(oio_req *req) { +static void dummy_timeout_cb(oio_req *req) { /* Should never be called */ FATAL(dummy_timer_cb should never be called) } @@ -59,4 +59,4 @@ TEST_IMPL(timeout) { FATAL(should never get here) return 2; -} \ No newline at end of file +} diff --git a/test/test.h b/test/test.h index c9addd0f..332e8bc6 100644 --- a/test/test.h +++ b/test/test.h @@ -43,4 +43,4 @@ #define TEST_IMPL(name) \ int run_##name() -#endif /* TEST_H_ */ \ No newline at end of file +#endif /* TEST_H_ */