Unix: fix build for timer test
This commit is contained in:
parent
84ebdf8429
commit
c8bdf15f5d
@ -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) {
|
int oio_read(oio_req *req, oio_buf* bufs, int bufcnt) {
|
||||||
oio_handle* handle = req->handle;
|
oio_handle* handle = req->handle;
|
||||||
ssize_t nread = -1;
|
ssize_t nread = -1;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
TEST_DECLARE (echo_server)
|
TEST_DECLARE (echo_server)
|
||||||
TEST_DECLARE (ping_pong)
|
TEST_DECLARE (ping_pong)
|
||||||
TEST_DECLARE (close_cb_stack);
|
TEST_DECLARE (close_cb_stack)
|
||||||
TEST_DECLARE (timeout);
|
TEST_DECLARE (timeout)
|
||||||
TEST_DECLARE (fail_always)
|
TEST_DECLARE (fail_always)
|
||||||
TEST_DECLARE (pass_always)
|
TEST_DECLARE (pass_always)
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#ifndef TEST_RUNNER_H_
|
#ifndef TEST_RUNNER_H_
|
||||||
#define TEST_RUNNER_H_
|
#define TEST_RUNNER_H_
|
||||||
|
|
||||||
|
|||||||
@ -2,23 +2,23 @@
|
|||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
|
|
||||||
int expected = 0;
|
static int expected = 0;
|
||||||
int timeouts = 0;
|
static int timeouts = 0;
|
||||||
|
|
||||||
|
|
||||||
void timeout_cb(oio_req *req) {
|
static void timeout_cb(oio_req *req) {
|
||||||
ASSERT(req != NULL);
|
ASSERT(req != NULL);
|
||||||
free(req);
|
free(req);
|
||||||
timeouts++;
|
timeouts++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void exit_timeout_cb(oio_req *req) {
|
static void exit_timeout_cb(oio_req *req) {
|
||||||
ASSERT(req != NULL);
|
ASSERT(req != NULL);
|
||||||
ASSERT(timeouts == expected);
|
ASSERT(timeouts == expected);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dummy_timeout_cb(oio_req *req) {
|
static void dummy_timeout_cb(oio_req *req) {
|
||||||
/* Should never be called */
|
/* Should never be called */
|
||||||
FATAL(dummy_timer_cb should never be called)
|
FATAL(dummy_timer_cb should never be called)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user