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

Function sp_stdout_fixture_open

tests/test_subprocess.c:1849–1864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1847}
1848
1849static bool sp_stdout_fixture_open(sp_stdout_fixture_t *fx) {
1850 memset(fx, 0, sizeof(*fx));
1851 if (!sp_stdout_test_binary || !sp_stdout_test_binary[0])
1852 return false;
1853 const char *root = th_mktempdir("cbm-sp-stdout");
1854 if (!root)
1855 return false;
1856 int n = snprintf(fx->root, sizeof(fx->root), "%s", root);
1857 bool ok = n > 0 && (size_t)n < sizeof(fx->root) && sp_stdout_path(fx->out, root, "out.bin") &&
1858 sp_stdout_path(fx->log, root, "err.log") &&
1859 sp_stdout_path(fx->other, root, "other.bin") &&
1860 sp_stdout_path(fx->gate, root, "release");
1861 if (!ok)
1862 (void)th_rmtree(root);
1863 return ok;
1864}
1865
1866static bool sp_stdout_file_equals(const char *path, const void *bytes, size_t count) {
1867 FILE *file = cbm_fopen(path, "rb");

Callers 1

test_subprocess.cFile · 0.85

Calls 3

th_mktempdirFunction · 0.85
sp_stdout_pathFunction · 0.85
th_rmtreeFunction · 0.85

Tested by

no test coverage detected