[PATCH v7 04/16] reftable: check reftable_stack_auto_compact() return value
- From
Han-Wen Nienhuys via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Jan 24, 2022, 19:13 UTC
- Message-ID
- <b0bffb6e29d2d060c7698cd3e84918f14ad8a3e3.1643051624.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.1152.v7.git.git.1643051624.gitgitgadget@gmail.com>
From: Han-Wen Nienhuys <hanwen@google.com>
If compaction consistently errors out, we would accumulate reftables, and the follow-on EXPECT would start failing, but catching errors early helps debugging.
Spotted by Coverity.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> --- reftable/stack_test.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/reftable/stack_test.c b/reftable/stack_test.c index f4c743db80c..e84f50d27ff 100644 --- a/reftable/stack_test.c +++ b/reftable/stack_test.c @@ -839,6 +839,7 @@ static void test_reftable_stack_auto_compaction(void) EXPECT_ERR(err); err = reftable_stack_auto_compact(st); + EXPECT_ERR(err); EXPECT(i < 3 || st->merged->stack_len < 2 * fastlog2(i)); }
-- gitgitgadget