| 24582 | } scan_fixture_t; |
| 24583 | |
| 24584 | static bool scan_fixture_open(scan_fixture_t *fx) { |
| 24585 | memset(fx, 0, sizeof(*fx)); |
| 24586 | const char *tmp = th_mktempdir("cbm_scan"); |
| 24587 | if (!tmp) { |
| 24588 | return false; |
| 24589 | } |
| 24590 | snprintf(fx->dir, sizeof(fx->dir), "%s", tmp); |
| 24591 | snprintf(fx->list, sizeof(fx->list), "%s/list", tmp); |
| 24592 | snprintf(fx->out, sizeof(fx->out), "%s/out", tmp); |
| 24593 | return true; |
| 24594 | } |
| 24595 | |
| 24596 | /* Add a file holding exactly `length` bytes (NUL bytes allowed). */ |
| 24597 | static bool scan_fixture_add(scan_fixture_t *fx, const char *name, const char *data, |
no test coverage detected