Mercurial > dovecot > core-2.2
comparison src/lib/test-istream-multiplex.c @ 22596:1a7bbda6284b
iostream-multiplex: Check return values in tests
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Fri, 06 Oct 2017 08:52:18 +0300 |
parents | c6c9c24d6182 |
children | cb108f786fb4 |
comparison
equal
deleted
inserted
replaced
22595:a3632f4d817f | 22596:1a7bbda6284b |
---|---|
263 { &cid, sizeof(cid) }, | 263 { &cid, sizeof(cid) }, |
264 { &len, sizeof(len) }, | 264 { &len, sizeof(len) }, |
265 { msg, strlen(msg) }, | 265 { msg, strlen(msg) }, |
266 { "\n", 1 } /* newline added for i_stream_next_line */ | 266 { "\n", 1 } /* newline added for i_stream_next_line */ |
267 }; | 267 }; |
268 o_stream_sendv(os, iov, N_ELEMENTS(iov)); | 268 o_stream_nsendv(os, iov, N_ELEMENTS(iov)); |
269 } | 269 } |
270 | 270 |
271 static void test_istream_multiplex_stream_write(struct ostream *channel) | 271 static void test_istream_multiplex_stream_write(struct ostream *channel) |
272 { | 272 { |
273 size_t rounds = rand() % 10; | 273 size_t rounds = rand() % 10; |
308 | 308 |
309 i_stream_unref(&chan1); | 309 i_stream_unref(&chan1); |
310 i_stream_unref(&chan0); | 310 i_stream_unref(&chan0); |
311 i_stream_unref(&is); | 311 i_stream_unref(&is); |
312 | 312 |
313 test_assert(o_stream_nfinish(os) == 0); | |
313 o_stream_unref(&os); | 314 o_stream_unref(&os); |
314 | 315 |
315 io_loop_destroy(&ioloop); | 316 io_loop_destroy(&ioloop); |
316 | 317 |
317 i_close_fd(&fds[0]); | 318 i_close_fd(&fds[0]); |