Lines Matching defs:log
7 #include "mail-transaction-log-private.h"
19 int mail_transaction_log_lock_head(struct mail_transaction_log *log ATTR_UNUSED,
42 static void test_append_expunge(struct mail_transaction_log *log)
45 struct mail_transaction_log_file *file = log->head;
51 test_assert(mail_transaction_log_append_begin(log->index, MAIL_TRANSACTION_EXTERNAL, &ctx) == 0);
92 static void test_append_sync_offset(struct mail_transaction_log *log)
94 struct mail_transaction_log_file *file = log->head;
100 test_begin("transaction log append: append_sync_offset only");
101 test_assert(mail_transaction_log_append_begin(log->index, 0, &ctx) == 0);
121 struct mail_transaction_log *log;
132 test_begin("transaction log append");
133 log = i_new(struct mail_transaction_log, 1);
134 log->index = i_new(struct mail_index, 1);
135 log->index->log = log;
136 log->head = file = i_new(struct mail_transaction_log_file, 1);
139 test_append_expunge(log);
141 test_begin("transaction log append: lock failure");
143 test_assert(mail_transaction_log_append_begin(log->index, 0, &ctx) < 0);
147 test_append_sync_offset(log);
150 test_begin("transaction log append: garbage truncation");
155 test_assert(mail_transaction_log_append_begin(log->index, 0, &ctx) == 0);
162 buffer_free(&log->head->buffer);
163 i_free(log->head);
164 i_free(log->index);
165 i_free(log);