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

Function setup

tests/test_coverage_parent_failure.c:184–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184static bool setup(Fixture *f, const char *root) {
185 int n = snprintf(f->control, sizeof(f->control), "%s/parent-control.XXXXXX", root);
186 if (n <= 0 || (size_t)n >= sizeof(f->control))
187 return false;
188 int fd = mkstemp(f->control);
189 if (fd < 0)
190 return false;
191 struct stat info;
192 bool ok = fstat(fd, &info) == 0 && S_ISREG(info.st_mode);
193 if (close(fd) != 0)
194 ok = false;
195 return ok && pipe(f->ack) == 0 && pipe(f->gate) == 0 &&
196 getrlimit(RLIMIT_NOFILE, &f->saved) == 0 && fflush(NULL) == 0;
197}
198
199static bool launch(Fixture *f) {
200 if (restricted_requested) {

Callers 1

fixtureFunction · 0.70

Calls 1

closeFunction · 0.50

Tested by

no test coverage detected