| 745 | } |
| 746 | |
| 747 | static bool pf_sidecar_refusal(pf_fixture_t *f, const char *suffix) { |
| 748 | char path[1100]; |
| 749 | int n = snprintf(path, sizeof(path), "%s%s", f->db, suffix); |
| 750 | if (n <= 0 || (size_t)n >= sizeof(path) || !pf_write(path, "caller-owned-sidecar\n")) |
| 751 | return false; |
| 752 | cbm_pipeline_frozen_t *owner = NULL; |
| 753 | bool ready = pf_create(f, "{}", NULL, &owner) == CBM_PIPELINE_FROZEN_OK && owner; |
| 754 | cbm_pipeline_frozen_status_t status = |
| 755 | ready ? cbm_pipeline_frozen_build(owner) : CBM_PIPELINE_FROZEN_INVALID; |
| 756 | bool ok = ready && status == CBM_PIPELINE_FROZEN_DEST_EXISTS && |
| 757 | !cbm_pipeline_frozen_candidate_path(owner) && |
| 758 | pf_file_is(path, "caller-owned-sidecar\n") && pf_files_equal(f->control, f->saved); |
| 759 | cbm_pipeline_frozen_free(owner); |
| 760 | return cbm_unlink(path) == 0 && ok && pf_directory_only(f->destination, NULL); |
| 761 | } |
| 762 | static bool pf_path_refusal(pf_fixture_t *f, int variant) { |
| 763 | char bad[1024]; |
| 764 | cbm_git_context_t git = pf_git(f); |
no test coverage detected