| 198 | }; |
| 199 | |
| 200 | static bool tf_setup_cache_sentinel(void) { |
| 201 | snprintf(tf_home_sentinel, sizeof(tf_home_sentinel), "/tmp/cbm-test-home-XXXXXX"); |
| 202 | if (!cbm_mkdtemp(tf_home_sentinel)) { |
| 203 | return false; |
| 204 | } |
| 205 | /* Legacy integration fixtures derive DB paths from HOME, while production |
| 206 | * cache_dir() prefers CBM_CACHE_DIR. A private HOME plus no inherited cache |
| 207 | * override keeps both conventions pointed at the same isolated tree. */ |
| 208 | cbm_setenv("HOME", tf_home_sentinel, 1); |
| 209 | cbm_unsetenv("CBM_CACHE_DIR"); |
| 210 | for (size_t i = 0U; i < sizeof(tf_client_home_overrides) / sizeof(tf_client_home_overrides[0]); |
| 211 | i++) { |
| 212 | cbm_unsetenv(tf_client_home_overrides[i]); |
| 213 | } |
| 214 | atexit(tf_cleanup_cache_sentinel); |
| 215 | return true; |
| 216 | } |
| 217 | |
| 218 | /* Fast real-process probes for the async index-supervisor contract. They run |
| 219 | * only in a child admitted by the exact build-bound worker grammar. */ |
no test coverage detected