| 226 | }; |
| 227 | |
| 228 | static bool tf_setup_cache_sentinel(void) { |
| 229 | snprintf(tf_home_sentinel, sizeof(tf_home_sentinel), "/tmp/cbm-test-home-XXXXXX"); |
| 230 | if (!cbm_mkdtemp(tf_home_sentinel)) { |
| 231 | return false; |
| 232 | } |
| 233 | /* Legacy integration fixtures derive DB paths from HOME, while production |
| 234 | * cache_dir() prefers CBM_CACHE_DIR. A private HOME plus no inherited cache |
| 235 | * override keeps both conventions pointed at the same isolated tree. */ |
| 236 | cbm_setenv("HOME", tf_home_sentinel, 1); |
| 237 | cbm_unsetenv("CBM_CACHE_DIR"); |
| 238 | for (size_t i = 0U; i < sizeof(tf_client_home_overrides) / sizeof(tf_client_home_overrides[0]); |
| 239 | i++) { |
| 240 | cbm_unsetenv(tf_client_home_overrides[i]); |
| 241 | } |
| 242 | atexit(tf_cleanup_cache_sentinel); |
| 243 | return true; |
| 244 | } |
| 245 | |
| 246 | /* Fast real-process probes for the async index-supervisor contract. They run |
| 247 | * only in a child admitted by the exact build-bound worker grammar. */ |
no test coverage detected