Repository navigation
Commit 332ba75
committed
test(pi-shell): give the consent test the default serial key of the GROK_HOME tests
`set_consent_answer_is_monotonic_per_account` set GROK_HOME under the named key
`serial(GROK_HOME)`. `EnvGuard` has no lock of its own, and every other test that
sets GROK_HOME uses the default `serial` key, so only the consent test could run at
the same time as the tests that read GROK_HOME without a guard
(`session::worktree::tests::resolve_worktree_by_id_or_path_*`).
When the two overlapped, the worktree test opened `worktrees.db` in the temporary
home of the consent test. The consent test then deleted that home at its end, and
the open connection failed with SQLite error 1802 ("disk I/O error", a failed stat
of the database file).
An LD_PRELOAD trace of one failing run showed it: the worktree test's thread opened
`<tmp>/worktrees.db`, a thread that ran the consent test removed the directory 130 ms
later, and no `fstat` call failed. Before the fix the failure was deterministic in
the full lib run with 12 test threads; at 4 threads it did not appear.
The fix is one attribute. No production code changes.1 parent 5a39e09 commit 332ba75
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | | - | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
0 commit comments