MCPcopy Index your code
hub / github.com/git/git / test_reftable_stack__compaction_concurrent

Function test_reftable_stack__compaction_concurrent

t/unit-tests/u-reftable-stack.c:1144–1161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1142}
1143
1144void test_reftable_stack__compaction_concurrent(void)
1145{
1146 struct reftable_write_options opts = { 0 };
1147 struct reftable_stack *st1 = NULL, *st2 = NULL;
1148 char *dir = get_tmp_dir(__LINE__);
1149
1150 cl_assert_equal_i(reftable_new_stack(&st1, dir, &opts), 0);
1151 write_n_ref_tables(st1, 3);
1152
1153 cl_assert_equal_i(reftable_new_stack(&st2, dir, &opts), 0);
1154 cl_assert_equal_i(reftable_stack_compact_all(st1, NULL), 0);
1155
1156 reftable_stack_destroy(st1);
1157 reftable_stack_destroy(st2);
1158
1159 cl_assert_equal_i(count_dir_entries(dir), 2);
1160 clear_dir(dir);
1161}
1162
1163static void unclean_stack_close(struct reftable_stack *st)
1164{

Callers

nothing calls this directly

Calls 7

get_tmp_dirFunction · 0.85
reftable_new_stackFunction · 0.85
write_n_ref_tablesFunction · 0.85
reftable_stack_destroyFunction · 0.85
count_dir_entriesFunction · 0.85
clear_dirFunction · 0.85

Tested by

no test coverage detected