From 19e71d77ecc634e9f59872a095458d1c8452bf10 Mon Sep 17 00:00:00 2001 From: "Bradley C. Kuszmaul" Date: Tue, 16 Apr 2013 23:59:51 -0400 Subject: [PATCH] close[t:4045] Fixes #4045. The trick is to abort if we run out of work before the bad write appears. git-svn-id: file:///svn/toku/tokudb@35708 c7de825b-a66e-492c-adef-691d508d4ae1 --- src/tests/diskfull.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tests/diskfull.c b/src/tests/diskfull.c index 7e5973c0b86..c8aeb41e49a 100644 --- a/src/tests/diskfull.c +++ b/src/tests/diskfull.c @@ -174,6 +174,9 @@ do_writes_that_fail (void) { db_env_set_func_full_write (write_counting_and_failing); write_count=0; do_db_work(); + if (fail_at != FAIL_NEVER && write_count <= fail_at) { + abort(); // if we don't encounter the write (because there are not enough), then in fail_at mode, we need to abort so that the test will be happy. + } printf("%d", write_count); }