summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2012-11-23 14:24:37 +0000
committerKeith Bostic <keith@wiredtiger.com>2012-11-23 14:24:37 +0000
commitaaea15f55051b3879c083c2eef77349c85cd94dc (patch)
treebf23e394bda41433c750f77d97d7c182e4bf663d /test
parent9c9b898db4cd89f581f13e697afac8d56a397693 (diff)
downloadmongo-aaea15f55051b3879c083c2eef77349c85cd94dc.tar.gz
Make WT_SESSION::create's checksum configuration 3-state: on, off, or
uncompressed blocks only.
Diffstat (limited to 'test')
-rw-r--r--test/format/config.h4
-rw-r--r--test/format/format.h1
-rw-r--r--test/format/wts.c16
3 files changed, 14 insertions, 7 deletions
diff --git a/test/format/config.h b/test/format/config.h
index ca8809c02b1..53d2ce337da 100644
--- a/test/format/config.h
+++ b/test/format/config.h
@@ -78,10 +78,6 @@ static CONFIG c[] = {
"size of the cache in MB",
0, 0, 1, 100, &g.c_cache, NULL },
- { "checksum",
- "if there is a block checksum", /* 20% */
- 0, C_BOOL, 20, 0, &g.c_checksum, NULL },
-
{ "compression",
"type of compression (none | bzip | raw | snappy)",
0, C_IGNORE|C_STRING, 1, 4, NULL, &g.c_compression },
diff --git a/test/format/format.h b/test/format/format.h
index 1e06c79fc7f..40e0183040a 100644
--- a/test/format/format.h
+++ b/test/format/format.h
@@ -106,7 +106,6 @@ typedef struct {
u_int c_bitcnt; /* Config values */
u_int c_cache;
- u_int c_checksum;
char *c_compression;
char *c_data_source;
u_int c_delete_pct;
diff --git a/test/format/wts.c b/test/format/wts.c
index 9adab7fd53f..10ef91ac13e 100644
--- a/test/format/wts.c
+++ b/test/format/wts.c
@@ -145,8 +145,20 @@ wts_open(void)
",dictionary=%d", MMRAND(123, 517));
break;
}
- p += snprintf(p, (size_t)(end - p),
- ",checksum=%s", g.c_checksum ? "true" : "false");
+
+ /* Configure checksums. */
+ switch MMRAND(1, 10) {
+ case 1: /* 10% */
+ p += snprintf(p, (size_t)(end - p), ",checksum=\"on\"");
+ break;
+ case 2: /* 10% */
+ p += snprintf(p, (size_t)(end - p), ",checksum=\"off\"");
+ break;
+ default: /* 80% */
+ p += snprintf(
+ p, (size_t)(end - p), ",checksum=\"uncompressed\"");
+ break;
+ }
/* Configure compression. */
switch (g.compression) {