]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib,lib-test: i_warning to i_debug on alloc growing messages
authorMartti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
Sat, 23 Jul 2016 20:58:46 +0000 (23:58 +0300)
committerGitLab <gitlab@git.dovecot.net>
Mon, 1 Aug 2016 20:51:12 +0000 (23:51 +0300)
src/lib-test/test-common.c
src/lib/data-stack.c
src/lib/mempool-alloconly.c

index 270e0effff40e18a808a8a1c94fcaa97dec03c65..948e9b6af005b2928d6bd1e298e0a28ee09cec35 100644 (file)
@@ -294,14 +294,6 @@ test_error_handler(const struct failure_context *ctx,
 {
        test_dump_rand_state();
        default_error_handler(ctx, format, args);
-#ifdef DEBUG
-       if (ctx->type == LOG_TYPE_WARNING &&
-           strstr(format, "Growing") != NULL) {
-               /* ignore "Growing memory pool" and "Growing data stack"
-                  warnings */
-               return;
-       }
-#endif
        if (expected_errors > 0) {
                if (expected_error_str != NULL) {
                        test_assert(strstr(format, expected_error_str) != NULL);
index c9ee52dea6e8a6a0b4534ac3e06d82013b0b3e5b..342932df2608ec6ad80fccb8d1f6d9b8f8db5545 100644 (file)
@@ -413,9 +413,9 @@ static void *t_malloc_real(size_t size, bool permanent)
 
 #ifdef DEBUG
        if (warn && getenv("DEBUG_SILENT") == NULL) {
-               /* warn after allocation, so if i_warning() wants to
+               /* warn after allocation, so if i_debug() wants to
                   allocate more memory we don't go to infinite loop */
-               i_warning("Growing data stack by %"PRIuSIZE_T" as "
+               i_debug("Growing data stack by %"PRIuSIZE_T" as "
                          "'%s' reaches %llu bytes from %u allocations.",
                          current_block->size,
                          current_frame_block->marker[frame_pos],
index 3925438c6914cab90aa853bcff014bb4c5609d22..4af14b8596c937f49e7c181371a8f2174c8382e6 100644 (file)
@@ -222,11 +222,11 @@ static void block_alloc(struct alloconly_pool *apool, size_t size)
                size = nearest_power(size);
 #ifdef DEBUG
                if (!apool->disable_warning) {
-                       /* i_warning() overwrites unallocated data in data
+                       /* i_debug() overwrites unallocated data in data
                           stack, so make sure everything is allocated before
                           calling it. */
                        t_buffer_alloc_last_full();
-                       i_warning("Growing pool '%s' with: %"PRIuSIZE_T,
+                       i_debug("Growing pool '%s' with: %"PRIuSIZE_T,
                                  apool->name, size);
                }
 #endif