Skip to content

Commit a0e809d

Browse files
fix(store): address QA round 2 findings
- Validate child exit status (WIFEXITED + WEXITSTATUS) after waitpid so the test fails fast if the child couldn't open the store, rather than passing vacuously due to the "crashed" row never being written Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 675fdf3 commit a0e809d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/test_store_bulk.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ TEST(bulk_crash_recovery) {
141141
ASSERT_GT(pid, 0);
142142
int status;
143143
waitpid(pid, &status, 0);
144+
/* Confirm child exited normally so the write actually occurred. */
145+
ASSERT(WIFEXITED(status) && WEXITSTATUS(status) == 0);
144146

145147
/* Recovery: database must open cleanly. */
146148
cbm_store_t *recovered = cbm_store_open_path(db_path);

0 commit comments

Comments
 (0)