Mercurial > dovecot > core-2.2
changeset 17533:9fd5c57fa49b
lib: remove unwanted srand()s from unit tests
We'll get better coverage without them.
Note: this change causes the following test case failure occasionally:
test-istream-concat.c:88: Assert failed: size >= TEST_MAX_BUFFER_SIZE
istream concat random ................................................ : FAILED
test: random seed #1 was 1403027537
(The seed may vary, obviously.)
Signed-off-by: Phil Carmody <phil@dovecot.fi>
author | Phil Carmody <phil@dovecot.fi> |
---|---|
date | Fri, 27 Jun 2014 16:17:50 +0300 |
parents | 06f29889af37 |
children | fe0c69112049 |
files | src/lib/test-buffer.c src/lib/test-istream-concat.c |
diffstat | 2 files changed, 0 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/test-buffer.c Fri Jun 27 16:17:07 2014 +0300 +++ b/src/lib/test-buffer.c Fri Jun 27 16:17:50 2014 +0300 @@ -21,7 +21,6 @@ testdata[i] = rand(); memset(shadowbuf, 0, sizeof(shadowbuf)); - srand(1); shadowbuf_size = 0; for (i = 0; i < BUF_TEST_COUNT; i++) { if (buf->used == BUF_TEST_SIZE) {
--- a/src/lib/test-istream-concat.c Fri Jun 27 16:17:07 2014 +0300 +++ b/src/lib/test-istream-concat.c Fri Jun 27 16:17:50 2014 +0300 @@ -57,7 +57,6 @@ size_t size = 0; unsigned int i, j, offset, stream_count, data_len; - srand(3); stream_count = (rand() % TEST_MAX_ISTREAM_COUNT) + 2; streams = t_new(struct istream *, stream_count + 1); for (i = 0, offset = 0; i < stream_count; i++) {