MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / pf_cancel_failure

Function pf_cancel_failure

tests/test_pipeline_frozen.c:864–888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

862}
863
864static bool pf_cancel_failure(pf_fixture_t *f, int variant) {
865 atomic_int cancelled;
866 atomic_init(&cancelled, variant == 0 ? 1 : 0);
867 cbm_pipeline_frozen_t *owner = NULL;
868 bool ready = pf_create(f, "{}", &cancelled, &owner) == CBM_PIPELINE_FROZEN_OK && owner;
869 pf_hook_t hook = {.fixture = f,
870 .kind = variant == 2 ? PF_CANCEL_EXTERNAL : PF_CANCEL_OWNER,
871 .owner = owner,
872 .external = &cancelled};
873 if (ready && variant == 1)
874 cbm_pipeline_frozen_cancel(owner);
875 if (ready && variant >= 2)
876 ready = cbm_pipeline_frozen_set_publish_hooks_for_tests(owner, pf_before_publish, NULL,
877 &hook) == CBM_PIPELINE_FROZEN_OK;
878 cbm_pipeline_frozen_status_t status =
879 ready ? cbm_pipeline_frozen_build(owner) : CBM_PIPELINE_FROZEN_INVALID;
880 bool ok = ready && status == CBM_PIPELINE_FROZEN_CANCELLED &&
881 !cbm_pipeline_frozen_candidate_path(owner) &&
882 (variant < 2 || (hook.called && hook.changed)) && pf_absent(f->db) &&
883 pf_directory_only(f->destination, NULL);
884 atomic_store(&cancelled, 0);
885 ok = cbm_pipeline_frozen_build(owner) == CBM_PIPELINE_FROZEN_INVALID && ok;
886 cbm_pipeline_frozen_free(owner);
887 return ok && pf_files_equal(f->control, f->saved);
888}
889static bool pf_rename_failure(pf_fixture_t *f) {
890 cbm_pipeline_frozen_t *owner = NULL;
891 pf_hook_t hook = {.fixture = f};

Callers 1

Calls 9

pf_createFunction · 0.85
pf_absentFunction · 0.85
pf_directory_onlyFunction · 0.85
cbm_pipeline_frozen_freeFunction · 0.85
pf_files_equalFunction · 0.85

Tested by

no test coverage detected