X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-04-writepartial.c;h=d3f7043f7b2764ba7bc931defdbaf7709eaa83f7;hb=1d415706a6e948fe6dcc3b5dab45812b297f77a1;hp=4ca21a32a25d141c42c82959efea06994e3430f3;hpb=cdffdf5d61f8330cfc3467e73a84876eb3928e9b;p=ccan diff --git a/ccan/io/test/run-04-writepartial.c b/ccan/io/test/run-04-writepartial.c index 4ca21a32..d3f7043f 100644 --- a/ccan/io/test/run-04-writepartial.c +++ b/ccan/io/test/run-04-writepartial.c @@ -6,7 +6,9 @@ #include #include -#ifndef PORT +#ifdef DEBUG_CONN +#define PORT "64004" +#else #define PORT "65004" #endif @@ -25,6 +27,9 @@ static void finish_ok(struct io_conn *conn, struct data *d) static struct io_plan *init_conn(struct io_conn *conn, struct data *d) { +#ifdef DEBUG_CONN + io_set_debug(conn, true); +#endif ok1(d->state == 0); d->state++; io_set_finish(conn, finish_ok, d); @@ -109,7 +114,7 @@ int main(void) free(d); exit(0); } - ok1(io_loop() == d); + ok1(io_loop(NULL, NULL) == d); ok1(d->state == 2); ok1(d->bytes > 0); ok1(d->bytes <= 1024*1024);