diff options
author | Benety Goh <benety@mongodb.com> | 2021-08-20 15:18:03 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-20 20:16:47 +0000 |
commit | 1abfd89c2c2c7fefb1438f54f54a9daa1b84d706 (patch) | |
tree | 782993b413474e1e7ec992fc739a559fe3f1d3b6 /src/third_party/wiredtiger/test/csuite | |
parent | 6865365ee1761d00b76097e01748cbe35ec2df48 (diff) | |
download | mongo-1abfd89c2c2c7fefb1438f54f54a9daa1b84d706.tar.gz |
Revert "Import wiredtiger: b77c2015c6c7a98cf06f7cef7e11bd1bbe686142 from branch mongodb-master"
This reverts commit 75d04d3757a9cea8e0d712e05afa6174b5df4892.
Revert "Import wiredtiger: 73489047a5b56814b93c790ee04e24d84d49510e from branch mongodb-master"
This reverts commit b6ead6db6ea45e5b9b6a549edc9dae1ae20011bc.
Revert "Import wiredtiger: 9149c005b6c6789dae09de1911c3669f63527b00 from branch mongodb-master"
This reverts commit 1c41fd963dd4f15c5f108932ad36ae4056f5ca33.
Revert "Import wiredtiger: 79d24845314f944c9889e1ddc199bd6857977b3a from branch mongodb-master"
This reverts commit ade843756b2e8638a01f6bc6ace63c8195af46e3.
Revert "Import wiredtiger: 797f085d4af8abea62dd2dd4da5f551c48a98067 from branch mongodb-master"
This reverts commit 7dd3891b50e0ade5281656960d240c1db3f7934f.
Diffstat (limited to 'src/third_party/wiredtiger/test/csuite')
11 files changed, 73 insertions, 256 deletions
diff --git a/src/third_party/wiredtiger/test/csuite/Makefile.am b/src/third_party/wiredtiger/test/csuite/Makefile.am index f5da81e75ed..f5c3eaed361 100644 --- a/src/third_party/wiredtiger/test/csuite/Makefile.am +++ b/src/third_party/wiredtiger/test/csuite/Makefile.am @@ -37,7 +37,7 @@ all_TESTS += timestamp_abort/smoke.sh test_truncated_log_SOURCES = truncated_log/main.c noinst_PROGRAMS += test_truncated_log -all_TESTS += truncated_log/smoke.sh +all_TESTS += test_truncated_log test_wt1965_col_efficiency_SOURCES = wt1965_col_efficiency/main.c noinst_PROGRAMS += test_wt1965_col_efficiency @@ -49,7 +49,8 @@ all_TESTS += test_wt2403_lsm_workload test_wt2246_col_append_SOURCES = wt2246_col_append/main.c noinst_PROGRAMS += test_wt2246_col_append -all_TESTS += test_wt2246_col_append +# Temporarily disabled (WT-5790) +# all_TESTS += test_wt2246_col_append test_wt2323_join_visibility_SOURCES = wt2323_join_visibility/main.c noinst_PROGRAMS += test_wt2323_join_visibility @@ -145,11 +146,11 @@ all_TESTS += test_wt4891_meta_ckptlist_get_alloc test_wt6185_modify_ts_SOURCES = wt6185_modify_ts/main.c noinst_PROGRAMS += test_wt6185_modify_ts -all_TESTS += wt6185_modify_ts/smoke.sh +all_TESTS += test_wt6185_modify_ts test_wt6616_checkpoint_oldest_ts_SOURCES = wt6616_checkpoint_oldest_ts/main.c noinst_PROGRAMS += test_wt6616_checkpoint_oldest_ts -all_TESTS += wt6616_checkpoint_oldest_ts/smoke.sh +all_TESTS += test_wt6616_checkpoint_oldest_ts # Run this during a "make check" smoke test. TESTS = $(all_TESTS) diff --git a/src/third_party/wiredtiger/test/csuite/schema_abort/main.c b/src/third_party/wiredtiger/test/csuite/schema_abort/main.c index acf14348c0a..e16c7d7e79e 100644 --- a/src/third_party/wiredtiger/test/csuite/schema_abort/main.c +++ b/src/third_party/wiredtiger/test/csuite/schema_abort/main.c @@ -75,7 +75,7 @@ static const char *const uri_collection = "table:collection"; static const char *const ckpt_file = "checkpoint_done"; -static bool compat, inmem, stable_set, use_columns, use_ts, use_txn; +static bool compat, inmem, stable_set, use_ts, use_txn; static volatile uint64_t global_ts = 1; static volatile uint64_t uid = 1; typedef struct { @@ -96,10 +96,9 @@ static volatile THREAD_TS th_ts[MAX_TH]; /* * A minimum width of 10, along with zero filling, means that all the keys sort according to their - * integer value, making each thread's key space distinct. For column-store we just use the integer - * values and that has the same effect. + * integer value, making each thread's key space distinct. */ -#define ROW_KEY_FORMAT ("%010" PRIu64) +#define KEY_FORMAT ("%010" PRIu64) typedef struct { uint64_t absent_key; /* Last absent key */ @@ -671,20 +670,14 @@ thread_run(void *arg) } if (use_ts) stable_ts = __wt_atomic_addv64(&global_ts, 1); + testutil_check(__wt_snprintf(kname, sizeof(kname), KEY_FORMAT, i)); testutil_check(session->begin_transaction(session, NULL)); if (use_prep) testutil_check(oplog_session->begin_transaction(oplog_session, NULL)); - if (use_columns) { - cur_coll->set_key(cur_coll, i + 1); - cur_local->set_key(cur_local, i + 1); - cur_oplog->set_key(cur_oplog, i + 1); - } else { - testutil_check(__wt_snprintf(kname, sizeof(kname), ROW_KEY_FORMAT, i)); - cur_coll->set_key(cur_coll, kname); - cur_local->set_key(cur_local, kname); - cur_oplog->set_key(cur_oplog, kname); - } + cur_coll->set_key(cur_coll, kname); + cur_local->set_key(cur_local, kname); + cur_oplog->set_key(cur_oplog, kname); /* * Put an informative string into the value so that it can be viewed well in a binary dump. */ @@ -771,7 +764,7 @@ run_workload(uint32_t nth) THREAD_DATA *td; wt_thread_t *thr; uint32_t ckpt_id, i, ts_id; - char envconf[512], tableconf[128]; + char envconf[512]; thr = dcalloc(nth + 2, sizeof(*thr)); td = dcalloc(nth + 2, sizeof(THREAD_DATA)); @@ -790,13 +783,10 @@ run_workload(uint32_t nth) /* * Create all the tables. */ - testutil_check(__wt_snprintf(tableconf, sizeof(tableconf), - "key_format=%s,value_format=u,log=(enabled=false)", use_columns ? "r" : "S")); - testutil_check(session->create(session, uri_collection, tableconf)); - testutil_check(__wt_snprintf( - tableconf, sizeof(tableconf), "key_format=%s,value_format=u", use_columns ? "r" : "S")); - testutil_check(session->create(session, uri_local, tableconf)); - testutil_check(session->create(session, uri_oplog, tableconf)); + testutil_check( + session->create(session, uri_collection, "key_format=S,value_format=u,log=(enabled=false)")); + testutil_check(session->create(session, uri_local, "key_format=S,value_format=u")); + testutil_check(session->create(session, uri_oplog, "key_format=S,value_format=u")); /* * Don't log the stable timestamp table so that we know what timestamp was stored at the * checkpoint. @@ -919,15 +909,11 @@ main(int argc, char *argv[]) verify_only = false; working_dir = "WT_TEST.schema-abort"; - while ((ch = __wt_getopt(progname, argc, argv, "Cch:mT:t:vxz")) != EOF) + while ((ch = __wt_getopt(progname, argc, argv, "Ch:mT:t:vxz")) != EOF) switch (ch) { case 'C': compat = true; break; - case 'c': - /* Variable-length columns only; fixed would require considerable changes */ - use_columns = true; - break; case 'h': working_dir = __wt_optarg; break; @@ -1101,16 +1087,10 @@ main(int argc, char *argv[]) key, last_key); break; } - if (use_columns) { - cur_coll->set_key(cur_coll, key + 1); - cur_local->set_key(cur_local, key + 1); - cur_oplog->set_key(cur_oplog, key + 1); - } else { - testutil_check(__wt_snprintf(kname, sizeof(kname), ROW_KEY_FORMAT, key)); - cur_coll->set_key(cur_coll, kname); - cur_local->set_key(cur_local, kname); - cur_oplog->set_key(cur_oplog, kname); - } + testutil_check(__wt_snprintf(kname, sizeof(kname), KEY_FORMAT, key)); + cur_coll->set_key(cur_coll, kname); + cur_local->set_key(cur_local, kname); + cur_oplog->set_key(cur_oplog, kname); /* * The collection table should always only have the data as of the checkpoint. */ diff --git a/src/third_party/wiredtiger/test/csuite/schema_abort/smoke.sh b/src/third_party/wiredtiger/test/csuite/schema_abort/smoke.sh index e7d21ec30e6..5e82ae180bc 100755 --- a/src/third_party/wiredtiger/test/csuite/schema_abort/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/schema_abort/smoke.sh @@ -21,14 +21,6 @@ $TEST_WRAPPER $test_bin -t 10 -T 5 $TEST_WRAPPER $test_bin -m -t 10 -T 5 $TEST_WRAPPER $test_bin -C -t 10 -T 5 $TEST_WRAPPER $test_bin -C -m -t 10 -T 5 - -$TEST_WRAPPER $test_bin -c -t 10 -T 5 -$TEST_WRAPPER $test_bin -c -m -t 10 -T 5 -$TEST_WRAPPER $test_bin -c -C -t 10 -T 5 -$TEST_WRAPPER $test_bin -c -C -m -t 10 -T 5 - # FIXME: In WT-6116 the test is failing if timestamps are turned off. #$TEST_WRAPPER $test_bin -m -t 10 -T 5 -z -#$TEST_WRAPPER $test_bin -c -m -t 10 -T 5 -z $TEST_WRAPPER $test_bin -m -t 10 -T 5 -x -$TEST_WRAPPER $test_bin -c -m -t 10 -T 5 -x diff --git a/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c b/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c index 1d59222104b..6fa41f0d82c 100644 --- a/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c +++ b/src/third_party/wiredtiger/test/csuite/timestamp_abort/main.c @@ -79,7 +79,7 @@ static const char *const uri_shadow = "shadow"; static const char *const ckpt_file = "checkpoint_done"; -static bool columns, compat, inmem, stress, use_ts; +static bool compat, inmem, stress, use_ts; static volatile uint64_t global_ts = 1; /* @@ -107,10 +107,9 @@ static volatile uint64_t global_ts = 1; /* * A minimum width of 10, along with zero filling, means that all the keys sort according to their - * integer value, making each thread's key space distinct. For column-store we just use the integer - * values and that has the same effect. + * integer value, making each thread's key space distinct. */ -#define KEY_STRINGFORMAT ("%010" PRIu64) +#define KEY_FORMAT ("%010" PRIu64) typedef struct { uint64_t absent_key; /* Last absent key */ @@ -335,6 +334,8 @@ thread_run(void *arg) printf("Thread %" PRIu32 " starts at %" PRIu64 "\n", td->info, td->start); active_ts = 0; for (i = td->start;; ++i) { + testutil_check(__wt_snprintf(kname, sizeof(kname), KEY_FORMAT, i)); + testutil_check(session->begin_transaction(session, NULL)); if (use_prep) testutil_check(prepared_session->begin_transaction(prepared_session, NULL)); @@ -353,18 +354,10 @@ thread_run(void *arg) testutil_check(pthread_rwlock_unlock(&ts_lock)); } - if (columns) { - cur_coll->set_key(cur_coll, i + 1); - cur_local->set_key(cur_local, i + 1); - cur_oplog->set_key(cur_oplog, i + 1); - cur_shadow->set_key(cur_shadow, i + 1); - } else { - testutil_check(__wt_snprintf(kname, sizeof(kname), KEY_STRINGFORMAT, i)); - cur_coll->set_key(cur_coll, kname); - cur_local->set_key(cur_local, kname); - cur_oplog->set_key(cur_oplog, kname); - cur_shadow->set_key(cur_shadow, kname); - } + cur_coll->set_key(cur_coll, kname); + cur_local->set_key(cur_local, kname); + cur_oplog->set_key(cur_oplog, kname); + cur_shadow->set_key(cur_shadow, kname); /* * Put an informative string into the value so that it can be viewed well in a binary dump. */ @@ -466,7 +459,6 @@ run_workload(uint32_t nth) wt_thread_t *thr; uint32_t cache_mb, ckpt_id, i, ts_id; char envconf[512], uri[128]; - const char *table_config, *table_config_nolog; thr = dcalloc(nth + 2, sizeof(*thr)); td = dcalloc(nth + 2, sizeof(THREAD_DATA)); @@ -503,25 +495,19 @@ run_workload(uint32_t nth) printf("wiredtiger_open configuration: %s\n", envconf); testutil_check(wiredtiger_open(NULL, NULL, envconf, &conn)); testutil_check(conn->open_session(conn, NULL, NULL, &session)); - /* * Create all the tables. */ - if (columns) { - table_config_nolog = "key_format=r,value_format=u,log=(enabled=false)"; - table_config = "key_format=r,value_format=u"; - } else { - table_config_nolog = "key_format=S,value_format=u,log=(enabled=false)"; - table_config = "key_format=S,value_format=u"; - } testutil_check(__wt_snprintf(uri, sizeof(uri), "%s:%s", table_pfx, uri_collection)); - testutil_check(session->create(session, uri, table_config_nolog)); + testutil_check( + session->create(session, uri, "key_format=S,value_format=u,log=(enabled=false)")); testutil_check(__wt_snprintf(uri, sizeof(uri), "%s:%s", table_pfx, uri_shadow)); - testutil_check(session->create(session, uri, table_config_nolog)); + testutil_check( + session->create(session, uri, "key_format=S,value_format=u,log=(enabled=false)")); testutil_check(__wt_snprintf(uri, sizeof(uri), "%s:%s", table_pfx, uri_local)); - testutil_check(session->create(session, uri, table_config)); + testutil_check(session->create(session, uri, "key_format=S,value_format=u")); testutil_check(__wt_snprintf(uri, sizeof(uri), "%s:%s", table_pfx, uri_oplog)); - testutil_check(session->create(session, uri, table_config)); + testutil_check(session->create(session, uri, "key_format=S,value_format=u")); /* * Don't log the stable timestamp table so that we know what timestamp was stored at the * checkpoint. @@ -630,7 +616,7 @@ main(int argc, char *argv[]) (void)testutil_set_progname(argv); - columns = compat = inmem = stress = false; + compat = inmem = stress = false; use_ts = true; nth = MIN_TH; rand_th = rand_time = true; @@ -638,15 +624,11 @@ main(int argc, char *argv[]) verify_only = false; working_dir = "WT_TEST.timestamp-abort"; - while ((ch = __wt_getopt(progname, argc, argv, "Cch:LmsT:t:vz")) != EOF) + while ((ch = __wt_getopt(progname, argc, argv, "Ch:LmsT:t:vz")) != EOF) switch (ch) { case 'C': compat = true; break; - case 'c': - /* Variable-length columns only (for now) */ - columns = true; - break; case 'h': working_dir = __wt_optarg; break; @@ -717,9 +699,9 @@ main(int argc, char *argv[]) compat ? "true" : "false", inmem ? "true" : "false", stress ? "true" : "false", use_ts ? "true" : "false"); printf("Parent: Create %" PRIu32 " threads; sleep %" PRIu32 " seconds\n", nth, timeout); - printf("CONFIG: %s%s%s%s%s%s -h %s -T %" PRIu32 " -t %" PRIu32 "\n", progname, - compat ? " -C" : "", columns ? " -c" : "", inmem ? " -m" : "", stress ? " -s" : "", - !use_ts ? " -z" : "", working_dir, nth, timeout); + printf("CONFIG: %s%s%s%s%s -h %s -T %" PRIu32 " -t %" PRIu32 "\n", progname, + compat ? " -C" : "", inmem ? " -m" : "", stress ? " -s" : "", !use_ts ? " -z" : "", + working_dir, nth, timeout); /* * Fork a child to insert as many items. We will then randomly kill the child, run recovery * and make sure all items we wrote exist after recovery runs. @@ -841,20 +823,11 @@ main(int argc, char *argv[]) key, last_key); break; } - - if (columns) { - cur_coll->set_key(cur_coll, key + 1); - cur_local->set_key(cur_local, key + 1); - cur_oplog->set_key(cur_oplog, key + 1); - cur_shadow->set_key(cur_shadow, key + 1); - } else { - testutil_check(__wt_snprintf(kname, sizeof(kname), KEY_STRINGFORMAT, key)); - cur_coll->set_key(cur_coll, kname); - cur_local->set_key(cur_local, kname); - cur_oplog->set_key(cur_oplog, kname); - cur_shadow->set_key(cur_shadow, kname); - } - + testutil_check(__wt_snprintf(kname, sizeof(kname), KEY_FORMAT, key)); + cur_coll->set_key(cur_coll, kname); + cur_local->set_key(cur_local, kname); + cur_oplog->set_key(cur_oplog, kname); + cur_shadow->set_key(cur_shadow, kname); /* * The collection table should always only have the data as of the checkpoint. The * shadow table should always have the exact same data (or not) as the collection table, diff --git a/src/third_party/wiredtiger/test/csuite/timestamp_abort/smoke.sh b/src/third_party/wiredtiger/test/csuite/timestamp_abort/smoke.sh index b2c70340f4c..18d7f9b8dae 100755 --- a/src/third_party/wiredtiger/test/csuite/timestamp_abort/smoke.sh +++ b/src/third_party/wiredtiger/test/csuite/timestamp_abort/smoke.sh @@ -23,12 +23,8 @@ then fi $TEST_WRAPPER $test_bin $default_test_args -$TEST_WRAPPER $test_bin $default_test_args -c #$TEST_WRAPPER $test_bin $default_test_args -L $TEST_WRAPPER $test_bin -m $default_test_args -$TEST_WRAPPER $test_bin -m $default_test_args -c #$TEST_WRAPPER $test_bin -m $default_test_args -L $TEST_WRAPPER $test_bin -C $default_test_args -$TEST_WRAPPER $test_bin -C $default_test_args -c $TEST_WRAPPER $test_bin -C -m $default_test_args -$TEST_WRAPPER $test_bin -C -m $default_test_args -c diff --git a/src/third_party/wiredtiger/test/csuite/truncated_log/main.c b/src/third_party/wiredtiger/test/csuite/truncated_log/main.c index fa45e573781..d46b75d48c9 100644 --- a/src/third_party/wiredtiger/test/csuite/truncated_log/main.c +++ b/src/third_party/wiredtiger/test/csuite/truncated_log/main.c @@ -32,7 +32,6 @@ static char home[1024]; /* Program working dir */ static const char *const uri = "table:main"; -static bool use_columns = false; #define RECORDS_FILE "records" @@ -129,14 +128,8 @@ fill_db(void) WT_SESSION *session; uint32_t i, max_key, min_key, units, unused; char k[K_SIZE], v[V_SIZE]; - const char *table_config; bool first; - if (use_columns) - table_config = "key_format=r,value_format=S"; - else - table_config = "key_format=S,value_format=S"; - /* * Run in the home directory so that the records file is in there too. */ @@ -144,7 +137,7 @@ fill_db(void) testutil_die(errno, "chdir: %s", home); testutil_check(wiredtiger_open(NULL, NULL, ENV_CONFIG, &conn)); testutil_check(conn->open_session(conn, NULL, NULL, &session)); - testutil_check(session->create(session, uri, table_config)); + testutil_check(session->create(session, uri, "key_format=S,value_format=S")); testutil_check(session->open_cursor(session, uri, NULL, NULL, &cursor)); /* @@ -171,14 +164,10 @@ fill_db(void) max_key = min_key * 2; first = true; for (i = 0; i < max_key; ++i) { - if (use_columns) - cursor->set_key(cursor, i + 1); - else { - testutil_check(__wt_snprintf(k, sizeof(k), "key%03" PRIu32, i)); - cursor->set_key(cursor, k); - } + testutil_check(__wt_snprintf(k, sizeof(k), "key%03d", (int)i)); testutil_check( - __wt_snprintf(v, sizeof(v), "value%0*" PRIu32, (int)(V_SIZE - (strlen("value") + 1)), i)); + __wt_snprintf(v, sizeof(v), "value%0*d", (int)(V_SIZE - (strlen("value") + 1)), (int)i)); + cursor->set_key(cursor, k); cursor->set_value(cursor, v); testutil_check(cursor->insert(cursor)); @@ -241,12 +230,8 @@ main(int argc, char *argv[]) (void)testutil_set_progname(argv); working_dir = "WT_TEST.truncated-log"; - while ((ch = __wt_getopt(progname, argc, argv, "ch:")) != EOF) + while ((ch = __wt_getopt(progname, argc, argv, "h:")) != EOF) switch (ch) { - case 'c': - /* Variable-length columns only (for now) */ - use_columns = true; - break; case 'h': working_dir = __wt_optarg; break; diff --git a/src/third_party/wiredtiger/test/csuite/truncated_log/smoke.sh b/src/third_party/wiredtiger/test/csuite/truncated_log/smoke.sh deleted file mode 100755 index 0079adf0340..00000000000 --- a/src/third_party/wiredtiger/test/csuite/truncated_log/smoke.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh - -set -e - -# Smoke-test truncated_log as part of running "make check". - -if [ -n "$1" ] -then - # If the test binary is passed in manually. - test_bin=$1 -else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_truncated_log -fi - -$TEST_WRAPPER $test_bin -$TEST_WRAPPER $test_bin -c diff --git a/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/main.c b/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/main.c index 02205c88429..1f2e824047b 100644 --- a/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/main.c @@ -50,10 +50,7 @@ static u_int tnext; static uint64_t ts; /* Current timestamp. */ -static char keystr[100], modify_repl[256], tmp[4 * 1024]; -static uint64_t keyrecno; - -static bool use_columns = false; +static char key[100], modify_repl[256], tmp[4 * 1024]; /* * trace -- @@ -120,32 +117,6 @@ mmrand(u_int min, u_int max) } /* - * change_key -- - * Switch to a different key. - */ -static void -change_key(u_int n) -{ - if (use_columns) - keyrecno = n + 1; - else - testutil_check(__wt_snprintf(keystr, sizeof(keystr), "%010u.key", n)); -} - -/* - * set_key -- - * Set the current key in the cursor. - */ -static void -set_key(WT_CURSOR *c) -{ - if (use_columns) - c->set_key(c, keyrecno); - else - c->set_key(c, keystr); -} - -/* * modify_repl_init -- * Initialize the replacement information. */ @@ -210,13 +181,13 @@ modify(WT_SESSION *session, WT_CURSOR *c) for (cnt = loop = 1; loop < 5; ++cnt, ++loop) if (mmrand(1, 10) <= 8) { modify_build(entries, &nentries, cnt); - set_key(c); + c->set_key(c, key); testutil_check(c->modify(c, entries, nentries)); } /* Commit 90% of the time, else rollback. */ if (mmrand(1, 10) != 1) { - set_key(c); + c->set_key(c, key); testutil_check(c->search(c)); testutil_check(c->get_value(c, &v)); free(list[lnext].v); @@ -252,7 +223,7 @@ repeat(WT_SESSION *session, WT_CURSOR *c) testutil_check(__wt_snprintf(tmp, sizeof(tmp), "read_timestamp=%" PRIx64, list[i].ts)); testutil_check(session->timestamp_transaction(session, tmp)); - set_key(c); + c->set_key(c, key); testutil_check(c->search(c)); testutil_check(c->get_value(c, &v)); @@ -275,7 +246,7 @@ evict(WT_CURSOR *c) { trace("%s", "eviction"); - set_key(c); + c->set_key(c, key); testutil_check(c->search(c)); F_SET(c, WT_CURSTD_DEBUG_RESET_EVICT); testutil_check(c->reset(c)); @@ -315,7 +286,7 @@ main(int argc, char *argv[]) WT_SESSION *session; u_int i, j; int ch; - char path[1024], table_config[128], value[VALUE_SIZE]; + char path[1024], value[VALUE_SIZE]; const char *home, *v; bool no_checkpoint, no_eviction; @@ -327,12 +298,8 @@ main(int argc, char *argv[]) no_checkpoint = no_eviction = false; home = "WT_TEST.wt6185_modify_ts"; - while ((ch = __wt_getopt(progname, argc, argv, "Cceh:S:")) != EOF) + while ((ch = __wt_getopt(progname, argc, argv, "ceh:S:")) != EOF) switch (ch) { - case 'C': - /* Variable-length columns only (for now anyway) */ - use_columns = true; - break; case 'c': no_checkpoint = true; break; @@ -355,17 +322,14 @@ main(int argc, char *argv[]) testutil_work_dir_from_path(path, sizeof(path), home); testutil_make_work_dir(path); - testutil_check(__wt_snprintf( - table_config, sizeof(table_config), "key_format=%s,value_format=S", use_columns ? "r" : "S")); - /* Load 100 records. */ testutil_check(wiredtiger_open(path, NULL, "create", &conn)); testutil_check(conn->open_session(conn, NULL, NULL, &session)); - testutil_check(session->create(session, "file:xxx", table_config)); + testutil_check(session->create(session, "file:xxx", "key_format=S,value_format=S")); testutil_check(session->open_cursor(session, "file:xxx", NULL, NULL, &c)); for (i = 0; i <= 100; ++i) { - change_key(i); - set_key(c); + testutil_check(__wt_snprintf(key, sizeof(key), "%010u.key", i)); + c->set_key(c, key); SET_VALUE(i, value); c->set_value(c, value); testutil_check(c->insert(c)); @@ -377,8 +341,8 @@ main(int argc, char *argv[]) testutil_check(conn->open_session(conn, NULL, NULL, &session)); testutil_check(session->create(session, "file:xxx", NULL)); testutil_check(session->open_cursor(session, "file:xxx", NULL, NULL, &c)); - change_key(KEYNO); - set_key(c); + testutil_check(__wt_snprintf(key, sizeof(key), "%010d.key", KEYNO)); + c->set_key(c, key); testutil_check(c->search(c)); testutil_check(c->get_value(c, &v)); SET_VALUE(KEYNO, value); diff --git a/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/smoke.sh b/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/smoke.sh deleted file mode 100755 index b317eeeb2ed..00000000000 --- a/src/third_party/wiredtiger/test/csuite/wt6185_modify_ts/smoke.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh - -set -e - -# Smoke-test wt6185_modify_ts as part of running "make check". - -if [ -n "$1" ] -then - # If the test binary is passed in manually. - test_bin=$1 -else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_wt6185_modify_ts -fi - -$TEST_WRAPPER $test_bin -$TEST_WRAPPER $test_bin -C - diff --git a/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/main.c b/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/main.c index 2e9648efea0..5a75777aa78 100644 --- a/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/main.c @@ -32,7 +32,6 @@ #include <signal.h> static char home[1024]; /* Program working dir */ -static bool use_columns = false; /* * Spin up a child process to do operations and checkpoint. For each set of operations on a key, @@ -49,7 +48,7 @@ static bool use_columns = false; * recovery by reading without a timestamp. Whether it is possible to read historical versions based * on timestamps from a logged table after recovery is not defined and implemented yet. */ -#define ROW_KEY_FORMAT ("%010" PRIu64) +#define KEY_FORMAT ("%010" PRIu64) #define MAX_CKPT_INVL 5 /* Maximum interval between checkpoints */ #define MAX_DATA 1000 @@ -148,14 +147,11 @@ thread_run(void *arg) /* Insert and then delete the keys until we're killed. */ printf("Worker thread started.\n"); for (oldest_ts = 0, ts = 1;; ++ts) { - testutil_check(__wt_snprintf(kname, sizeof(kname), ROW_KEY_FORMAT, ts)); + testutil_check(__wt_snprintf(kname, sizeof(kname), KEY_FORMAT, ts)); /* Insert the same value for key and value. */ testutil_check(session->begin_transaction(session, NULL)); - if (use_columns) - cursor->set_key(cursor, ts); - else - cursor->set_key(cursor, kname); + cursor->set_key(cursor, kname); data.data = kname; data.size = sizeof(kname); cursor->set_value(cursor, &data); @@ -197,7 +193,7 @@ run_workload(void) WT_SESSION *session; wt_thread_t *thr; uint32_t i; - char envconf[512], tableconf[512]; + char envconf[512]; thr = dcalloc(2, sizeof(*thr)); @@ -210,9 +206,8 @@ run_workload(void) testutil_check(conn->open_session(conn, NULL, NULL, &session)); /* Create the table. */ - testutil_check(__wt_snprintf(tableconf, sizeof(tableconf), - "key_format=%s,value_format=u,log=(enabled=false)", use_columns ? "r" : "S")); - testutil_check(session->create(session, uri, tableconf)); + testutil_check( + session->create(session, uri, "key_format=S,value_format=u,log=(enabled=false)")); testutil_check(session->close(session, NULL)); /* The checkpoint thread is added at the end. */ @@ -273,12 +268,8 @@ main(int argc, char *argv[]) timeout = MIN_TIME; working_dir = "WT_TEST.wt6616-checkpoint-oldest-ts"; - while ((ch = __wt_getopt(progname, argc, argv, "ch:t:")) != EOF) + while ((ch = __wt_getopt(progname, argc, argv, "h:t:")) != EOF) switch (ch) { - case 'c': - /* Variable-length columns only (for now) */ - use_columns = true; - break; case 'h': working_dir = __wt_optarg; break; @@ -372,11 +363,8 @@ main(int argc, char *argv[]) for (ts = oldest_ts; ts <= stable_ts; ++ts) { testutil_check(__wt_snprintf(tscfg, sizeof(tscfg), "read_timestamp=%" PRIx64, ts)); testutil_check(session->begin_transaction(session, tscfg)); - testutil_check(__wt_snprintf(kname, sizeof(kname), ROW_KEY_FORMAT, ts)); - if (use_columns) - cursor->set_key(cursor, ts); - else - cursor->set_key(cursor, kname); + testutil_check(__wt_snprintf(kname, sizeof(kname), KEY_FORMAT, ts)); + cursor->set_key(cursor, kname); ret = cursor->search(cursor); if (ret == WT_NOTFOUND) { fatal = true; diff --git a/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/smoke.sh b/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/smoke.sh deleted file mode 100755 index 9b9cc997026..00000000000 --- a/src/third_party/wiredtiger/test/csuite/wt6616_checkpoint_oldest_ts/smoke.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh - -set -e - -# Smoke-test wt6616_checkpoint_oldest_ts as part of running "make check". - -if [ -n "$1" ] -then - # If the test binary is passed in manually. - test_bin=$1 -else - # If $top_builddir/$top_srcdir aren't set, default to building in build_posix - # and running in test/csuite. - top_builddir=${top_builddir:-../../build_posix} - top_srcdir=${top_srcdir:-../..} - test_bin=$top_builddir/test/csuite/test_wt6616_checkpoint_oldest_ts -fi - -$TEST_WRAPPER $test_bin -$TEST_WRAPPER $test_bin -c - |