summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Gorrod <alexg@wiredtiger.com>2013-05-03 11:35:02 +1000
committerAlex Gorrod <alexg@wiredtiger.com>2013-05-03 11:35:02 +1000
commit62021e3c7ef991b7d2f36daec2fdf3b0ce97a6a0 (patch)
tree1ad1d701242486ff47fa99a5c9db3810ecdd5574 /test
parentaaaa018d8ac1d4629d5337a58e615461f4f0add2 (diff)
downloadmongo-62021e3c7ef991b7d2f36daec2fdf3b0ce97a6a0.tar.gz
Don't allow test format configurations with illegal page sizes.
Diffstat (limited to 'test')
-rw-r--r--test/format/wts.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/format/wts.c b/test/format/wts.c
index 2b4933842e0..4eaff63180e 100644
--- a/test/format/wts.c
+++ b/test/format/wts.c
@@ -109,7 +109,8 @@ wts_open(void)
* Make sure at least 2 internal page per thread can fit in cache.
*/
maxintlpage = 1U << g.c_intl_page_max;
- while (2 * g.c_threads * maxintlpage > g.c_cache << 20)
+ while (maxintlpage > 512 &&
+ 2 * g.c_threads * maxintlpage > g.c_cache << 20)
maxintlpage >>= 1;
maxintlitem = MMRAND(maxintlpage / 50, maxintlpage / 40);
if (maxintlitem < 40)
@@ -117,7 +118,8 @@ wts_open(void)
/* Make sure at least two leaf pages per thread can fit in cache. */
maxleafpage = 1U << g.c_leaf_page_max;
- while (2 * g.c_threads * (maxintlpage + maxleafpage) > g.c_cache << 20)
+ while (maxleafpage > 512 &&
+ 2 * g.c_threads * (maxintlpage + maxleafpage) > g.c_cache << 20)
maxleafpage >>= 1;
maxleafitem = MMRAND(maxleafpage / 50, maxleafpage / 40);
if (maxleafitem < 40)