From: Timo Sirainen Date: Fri, 27 Oct 2017 21:13:28 +0000 (+0300) Subject: lib: test-ostream-* - Call o_stream_nfinish() after uncorking X-Git-Tag: 2.3.0.rc1~715 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e41ef20f6e39649f620fc4e4d21924822ee3682;p=thirdparty%2Fdovecot%2Fcore.git lib: test-ostream-* - Call o_stream_nfinish() after uncorking --- diff --git a/src/lib/test-ostream-buffer.c b/src/lib/test-ostream-buffer.c index 40d5aeb28b..af5253cdd2 100644 --- a/src/lib/test-ostream-buffer.c +++ b/src/lib/test-ostream-buffer.c @@ -38,8 +38,8 @@ static void test_ostream_buffer_random_once(void) test_assert(o_stream_flush(output) > 0); } - test_assert(o_stream_flush(output) > 0); o_stream_uncork(output); + test_assert(o_stream_nfinish(output) == 0); i_assert(buffer->used <= MAX_BUFSIZE*4); test_assert(memcmp(buf, buffer->data, buffer->used) == 0); diff --git a/src/lib/test-ostream-file.c b/src/lib/test-ostream-file.c index ef49248350..4383ba4f2a 100644 --- a/src/lib/test-ostream-file.c +++ b/src/lib/test-ostream-file.c @@ -45,8 +45,8 @@ static void test_ostream_file_random_once(void) test_assert(o_stream_flush(output) > 0); } - test_assert(o_stream_flush(output) > 0); o_stream_uncork(output); + test_assert(o_stream_nfinish(output) == 0); ret = pread(fd, buf2, sizeof(buf2), 0); if (ret < 0) i_fatal("pread() failed: %m");