| 1142 | } |
| 1143 | |
| 1144 | void 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 | |
| 1163 | static void unclean_stack_close(struct reftable_stack *st) |
| 1164 | { |
nothing calls this directly
no test coverage detected