summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2018-04-10 18:25:30 +1000
committerLuke Chen <luke.chen@mongodb.com>2018-04-10 18:25:30 +1000
commit5ae38f156cb08fd5a66eb9e9327953e99442fc9c (patch)
treebdda4141d8e63aeab38fc8b615d521a8772546e8 /src/third_party/wiredtiger/test
parent9be2c132cb4713e13bbaa5648077e5346a29c99b (diff)
downloadmongo-5ae38f156cb08fd5a66eb9e9327953e99442fc9c.tar.gz
Import wiredtiger: 5bfcc924079afdcd6dda22c29b5fa60a14ec3dc9 from branch mongodb-3.8
ref: ea986ede14..5bfcc92407 for: 3.7.4 WT-3886 Identify statistics relevant for prepared transactions WT-3910 Fix libwiredtiger-3.0.1.dylib loading failure on OS X WT-4006 Add support for stress timing configurations to test/format WT-4009 Create fast path for cursor caching with "overwrite=false" WT-4014 If eviction walk is interrupted, clean up the queue. WT-4015 Enhance schema06 unit test to test drops WT-4017 When evicting during a checkpoint, avoid splits WT-4028 Don't check for a modified page without holding the ref locked
Diffstat (limited to 'src/third_party/wiredtiger/test')
-rw-r--r--src/third_party/wiredtiger/test/format/config.h32
-rw-r--r--src/third_party/wiredtiger/test/format/format.h8
-rw-r--r--src/third_party/wiredtiger/test/format/wts.c20
-rw-r--r--src/third_party/wiredtiger/test/mciproject.yml16
-rw-r--r--src/third_party/wiredtiger/test/suite/test_schema06.py6
5 files changed, 77 insertions, 5 deletions
diff --git a/src/third_party/wiredtiger/test/format/config.h b/src/third_party/wiredtiger/test/format/config.h
index 3ea93e28b99..1b5f170abf6 100644
--- a/src/third_party/wiredtiger/test/format/config.h
+++ b/src/third_party/wiredtiger/test/format/config.h
@@ -326,6 +326,38 @@ static CONFIG c[] = {
"maximum time to run in minutes",
C_IGNORE, 0, 0, UINT_MAX, &g.c_timer, NULL },
+ { "timing_stress_checkpoint",
+ "configure slow checkpoints", /* 2% */
+ C_BOOL, 2, 0, 0, &g.c_timing_stress_checkpoint, NULL },
+
+ { "timing_stress_split_1",
+ "configure slow splits (#1)", /* 2% */
+ C_BOOL, 2, 0, 0, &g.c_timing_stress_split_1, NULL },
+
+ { "timing_stress_split_2",
+ "configure slow splits (#2)", /* 2% */
+ C_BOOL, 2, 0, 0, &g.c_timing_stress_split_2, NULL },
+
+ { "timing_stress_split_3",
+ "configure slow splits (#3)", /* 2% */
+ C_BOOL, 2, 0, 0, &g.c_timing_stress_split_3, NULL },
+
+ { "timing_stress_split_4",
+ "configure slow splits (#4)", /* 2% */
+ C_BOOL, 2, 0, 0, &g.c_timing_stress_split_4, NULL },
+
+ { "timing_stress_split_5",
+ "configure slow splits (#5)", /* 2% */
+ C_BOOL, 2, 0, 0, &g.c_timing_stress_split_5, NULL },
+
+ { "timing_stress_split_6",
+ "configure slow splits (#6)", /* 2% */
+ C_BOOL, 2, 0, 0, &g.c_timing_stress_split_6, NULL },
+
+ { "timing_stress_split_7",
+ "configure slow splits (#7)", /* 2% */
+ C_BOOL, 2, 0, 0, &g.c_timing_stress_split_7, NULL },
+
{ "transaction_timestamps", /* 10% */
"enable transaction timestamp support",
C_BOOL, 10, 0, 0, &g.c_txn_timestamps, NULL },
diff --git a/src/third_party/wiredtiger/test/format/format.h b/src/third_party/wiredtiger/test/format/format.h
index 4eac7a5eb8e..378883a314f 100644
--- a/src/third_party/wiredtiger/test/format/format.h
+++ b/src/third_party/wiredtiger/test/format/format.h
@@ -211,6 +211,14 @@ typedef struct {
uint32_t c_statistics_server;
uint32_t c_threads;
uint32_t c_timer;
+ uint32_t c_timing_stress_checkpoint;
+ uint32_t c_timing_stress_split_1;
+ uint32_t c_timing_stress_split_2;
+ uint32_t c_timing_stress_split_3;
+ uint32_t c_timing_stress_split_4;
+ uint32_t c_timing_stress_split_5;
+ uint32_t c_timing_stress_split_6;
+ uint32_t c_timing_stress_split_7;
uint32_t c_txn_freq;
uint32_t c_txn_timestamps;
uint32_t c_truncate;
diff --git a/src/third_party/wiredtiger/test/format/wts.c b/src/third_party/wiredtiger/test/format/wts.c
index 04c15136b53..4f1d99b78fb 100644
--- a/src/third_party/wiredtiger/test/format/wts.c
+++ b/src/third_party/wiredtiger/test/format/wts.c
@@ -242,6 +242,26 @@ wts_open(const char *home, bool set_api, WT_CONNECTION **connp)
CONFIG_APPEND(p,
",statistics=(%s)", g.c_statistics ? "fast" : "none");
+ /* Optionally stress operations. */
+ CONFIG_APPEND(p, ",timing_stress_for_test=[");
+ if (g.c_timing_stress_checkpoint)
+ CONFIG_APPEND(p, ",checkpoint_slow");
+ if (g.c_timing_stress_split_1)
+ CONFIG_APPEND(p, ",split_race_1");
+ if (g.c_timing_stress_split_2)
+ CONFIG_APPEND(p, ",split_race_2");
+ if (g.c_timing_stress_split_3)
+ CONFIG_APPEND(p, ",split_race_3");
+ if (g.c_timing_stress_split_4)
+ CONFIG_APPEND(p, ",split_race_4");
+ if (g.c_timing_stress_split_5)
+ CONFIG_APPEND(p, ",split_race_5");
+ if (g.c_timing_stress_split_6)
+ CONFIG_APPEND(p, ",split_race_6");
+ if (g.c_timing_stress_split_7)
+ CONFIG_APPEND(p, ",split_race_7");
+ CONFIG_APPEND(p, "]");
+
/* Extensions. */
CONFIG_APPEND(p,
",extensions=["
diff --git a/src/third_party/wiredtiger/test/mciproject.yml b/src/third_party/wiredtiger/test/mciproject.yml
index 271f392ae7c..2ab1afe7225 100644
--- a/src/third_party/wiredtiger/test/mciproject.yml
+++ b/src/third_party/wiredtiger/test/mciproject.yml
@@ -65,6 +65,16 @@ tasks:
./build_posix/reconf
${configure_env_vars|} ./configure --enable-diagnostic --enable-python --enable-zlib --enable-strict
${make_command|make} ${smp_command|} 2>&1
+
+ # On macOS, change the binary location with install_name_tool since DYLD_LIBRARY_PATH
+ # appears not to work for dynamic modules loaded by python. For wt, the libtool generated
+ # script has the wrong path for running on test machines.
+ if [ "$(uname -s)" == "Darwin" ]; then
+ WT_VERSION=$(m4 build_posix/aclocal/version.m4)
+ install_name_tool -change /usr/local/lib/libwiredtiger-$WT_VERSION.dylib $(pwd)/.libs/libwiredtiger-$WT_VERSION.dylib lang/python/_wiredtiger*.so
+ install_name_tool -change /usr/local/lib/libwiredtiger-$WT_VERSION.dylib $(pwd)/.libs/libwiredtiger-$WT_VERSION.dylib .libs/wt
+ fi
+
${test_env_vars|} TESTUTIL_ENABLE_LONG_TESTS=1 ${make_command|make} VERBOSE=1 check 2>&1
fi
- command: archive.targz_pack
@@ -178,9 +188,9 @@ buildvariants:
- macos-1012
expansions:
smp_command: -j $(sysctl -n hw.logicalcpu)
- configure_env_vars: PATH=/opt/local/bin:$PATH
- make_command: PATH=/opt/local/bin:$PATH ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future make
- test_env_vars: PATH=/opt/local/bin:$PATH DYLD_LIBRARY_PATH=`pwd`/.libs
+ configure_env_vars: PATH=/opt/mongodbtoolchain/v2/bin:$PATH
+ make_command: PATH=/opt/mongodbtoolchain/v2/bin:$PATH ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future make
+ test_env_vars: PATH=/opt/mongodbtoolchain/v2/bin:$PATH DYLD_LIBRARY_PATH=`pwd`/.libs
tasks:
- name: compile
- name: unit-test
diff --git a/src/third_party/wiredtiger/test/suite/test_schema06.py b/src/third_party/wiredtiger/test/suite/test_schema06.py
index f1352a8b87c..2676ff5b0ea 100644
--- a/src/third_party/wiredtiger/test/suite/test_schema06.py
+++ b/src/third_party/wiredtiger/test/suite/test_schema06.py
@@ -62,9 +62,9 @@ class test_schema06(wttest.WiredTigerTestCase):
self.session.create("index:schema06:" + colname,
"columns=(" + colname + ")" + self.idx_config)
- def drop_index(inum):
+ def drop_index(self, inum):
colname = "s" + str(inum)
- self.session.drop("index:main:" + colname, None)
+ self.session.drop("index:schema06:" + colname, None)
def test_index_stress(self):
self.session.create("table:schema06",
@@ -84,6 +84,8 @@ class test_schema06(wttest.WiredTigerTestCase):
values[3],values[4],values[5])
cursor.insert()
cursor.close()
+ self.drop_index(0)
+ self.drop_index(1)
def check_entries(self, check_indices):
cursor = self.session.open_cursor('table:main', None, None)