dovecot-2.2: lib-index: Fixed failing transaction log test.
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jan 8 03:39:47 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/051affd69699
changeset: 15586:051affd69699
user: Timo Sirainen <tss at iki.fi>
date: Tue Jan 08 03:39:34 2013 +0200
description:
lib-index: Fixed failing transaction log test.
diffstat:
src/lib-index/test-mail-transaction-log-append.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diffs (25 lines):
diff -r 6a19df272459 -r 051affd69699 src/lib-index/test-mail-transaction-log-append.c
--- a/src/lib-index/test-mail-transaction-log-append.c Tue Jan 08 03:31:36 2013 +0200
+++ b/src/lib-index/test-mail-transaction-log-append.c Tue Jan 08 03:39:34 2013 +0200
@@ -44,6 +44,7 @@
struct mail_transaction_log_append_ctx *ctx;
const struct mail_transaction_header *hdr;
const unsigned int *bufp;
+ const struct mail_transaction_boundary *bound;
test_assert(mail_transaction_log_append_begin(log->index, MAIL_TRANSACTION_EXTERNAL, &ctx) == 0);
mail_transaction_log_append_add(ctx, MAIL_TRANSACTION_APPEND,
@@ -58,6 +59,13 @@
test_assert(file->sync_offset == file->buffer_offset + file->buffer->used);
hdr = file->buffer->data;
+ test_assert(hdr->type == (MAIL_TRANSACTION_BOUNDARY |
+ MAIL_TRANSACTION_EXTERNAL));
+ test_assert(mail_index_offset_to_uint32(hdr->size) == sizeof(*hdr) + sizeof(*bound));
+ bound = (const void *)(hdr + 1);
+ test_assert(bound->size == file->buffer->used);
+ hdr = (const void *)(bound + 1);
+
test_assert(hdr->type == (MAIL_TRANSACTION_APPEND |
MAIL_TRANSACTION_EXTERNAL));
test_assert(mail_index_offset_to_uint32(hdr->size) == sizeof(*hdr) + sizeof(buf[0]));
More information about the dovecot-cvs
mailing list