Self-diagnosing count check: this suite's flake family blocked two * releases because a bare count assert cannot say WHY — print the * committed/pending dirty signatures on mismatch, so the next occurrence * names its cause (sigs equal = detection miss; different = reindex path). * Use at any index_call_count assertion site. */
| 322 | * names its cause (sigs equal = detection miss; different = reindex path). |
| 323 | * Use at any index_call_count assertion site. */ |
| 324 | static void wt_diagnose_count(cbm_watcher_t *w, const char *project, int got, int expected) { |
| 325 | if (got == expected) { |
| 326 | return; |
| 327 | } |
| 328 | uint64_t last = 0, pending = 0; |
| 329 | if (cbm_watcher_test_dirty_sigs(w, project, &last, &pending) == 0) { |
| 330 | printf(" watcher diagnose: count=%d expected=%d last_sig=%016llx pending_sig=%016llx " |
| 331 | "(%s)\n", |
| 332 | got, expected, (unsigned long long)last, (unsigned long long)pending, |
| 333 | last == pending ? "sigs EQUAL — the poll saw no new dirty state" |
| 334 | : "sigs differ — detection fired, reindex path suspect"); |
| 335 | } else { |
| 336 | printf(" watcher diagnose: count=%d expected=%d (project not watched?)\n", got, expected); |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | /* Wait-for-the-asserted-state (bounded) for REACH assertions only: reaching |
| 341 | * a count is safe to wait for, because #937 guarantees an unchanged dirty |
no test coverage detected