| 166 | } |
| 167 | |
| 168 | static bool tf_setup_cache_sentinel(void) { |
| 169 | snprintf(tf_home_sentinel, sizeof(tf_home_sentinel), "/tmp/cbm-test-home-XXXXXX"); |
| 170 | if (!cbm_mkdtemp(tf_home_sentinel)) { |
| 171 | return false; |
| 172 | } |
| 173 | /* Legacy integration fixtures derive DB paths from HOME, while production |
| 174 | * cache_dir() prefers CBM_CACHE_DIR. A private HOME plus no inherited cache |
| 175 | * override keeps both conventions pointed at the same isolated tree. */ |
| 176 | cbm_setenv("HOME", tf_home_sentinel, 1); |
| 177 | cbm_unsetenv("CBM_CACHE_DIR"); |
| 178 | atexit(tf_cleanup_cache_sentinel); |
| 179 | return true; |
| 180 | } |
| 181 | |
| 182 | /* Fast real-process probes for the async index-supervisor contract. They run |
| 183 | * only in a child admitted by the exact build-bound worker grammar. */ |
no test coverage detected