| 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); |
| 765 | cbm_pipeline_frozen_inputs_t in = pf_inputs(f, "{}", &git, NULL); |
| 766 | if (variant == 0) { |
| 767 | if (!pf_path(bad, sizeof(bad), f->source, "inside.db")) |
| 768 | return false; |
| 769 | in.candidate_db_path = bad; |
| 770 | } else if (variant == 1) { |
| 771 | if (!pf_path(bad, sizeof(bad), f->home, "not-created/candidate.db")) |
| 772 | return false; |
| 773 | in.candidate_db_path = bad; |
| 774 | } else { |
| 775 | if (!pf_path(bad, sizeof(bad), f->source, "ordinary.c")) |
| 776 | return false; |
| 777 | in.source_root = bad; |
| 778 | } |
| 779 | cbm_pipeline_frozen_t *owner = NULL; |
| 780 | cbm_pipeline_frozen_status_t created = cbm_pipeline_frozen_create(&in, &owner); |
| 781 | bool ready = created == CBM_PIPELINE_FROZEN_OK && owner; |
| 782 | cbm_pipeline_frozen_status_t status = ready ? cbm_pipeline_frozen_build(owner) : created; |
| 783 | bool input_preserved = variant == 2 ? pf_file_is(bad, pf_ordinary) : pf_absent(bad); |
| 784 | bool ok = ready && status != CBM_PIPELINE_FROZEN_OK && status != CBM_PIPELINE_FROZEN_BUSY && |
| 785 | !cbm_pipeline_frozen_candidate_path(owner) && pf_absent(f->db) && |
| 786 | pf_directory_only(f->destination, NULL) && input_preserved; |
| 787 | cbm_pipeline_frozen_free(owner); |
| 788 | return ok && pf_files_equal(f->control, f->saved); |
| 789 | } |
| 790 | typedef struct { |
| 791 | char path[1100]; |
| 792 | bool called, created; |
no test coverage detected