diff options
author | Luke Chen <luke.chen@mongodb.com> | 2020-06-11 16:34:37 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-06-11 06:46:43 +0000 |
commit | 73e17e1abda5870abcdaee92230927bd3e9ece9b (patch) | |
tree | 2192bb04a24b3af49f2208e9ec26dbd8aff49e1b /src/third_party/wiredtiger/test | |
parent | 3abfe3f8aed2b6e15ecb7c80bc77db0449d5bea5 (diff) | |
download | mongo-73e17e1abda5870abcdaee92230927bd3e9ece9b.tar.gz |
Import wiredtiger: cd0eca9e685e9ac2446e8e6d5b398b366a7ba420 from branch mongodb-4.4
ref: 154719f3ff..cd0eca9e68
for: 4.4.0-rc10
WT-5916 Refresh snapshot without publishing ids after setting checkpoint timestamp
WT-6319 Fix for corrupted encrypted item: padded size less than actual size
WT-6368 Add format stress test as part of PR testing
WT-6374 Ensure upgrade after an unclean shutdown works
WT-6377 Fix cursor out-of-order on a cursor prev/next return
WT-6392 Clean up core files properly for wt4156_meta_salvage test
Diffstat (limited to 'src/third_party/wiredtiger/test')
-rw-r--r-- | src/third_party/wiredtiger/test/csuite/wt4156_metadata_salvage/main.c | 33 | ||||
-rwxr-xr-x | src/third_party/wiredtiger/test/evergreen.yml | 11 | ||||
-rw-r--r-- | src/third_party/wiredtiger/test/format/bulk.c | 2 |
3 files changed, 32 insertions, 14 deletions
diff --git a/src/third_party/wiredtiger/test/csuite/wt4156_metadata_salvage/main.c b/src/third_party/wiredtiger/test/csuite/wt4156_metadata_salvage/main.c index aaa1b49f961..4e1393b0449 100644 --- a/src/third_party/wiredtiger/test/csuite/wt4156_metadata_salvage/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt4156_metadata_salvage/main.c @@ -351,7 +351,15 @@ wt_open_corrupt(const char *sfx) testutil_check(__wt_snprintf(buf, sizeof(buf), "%s.%s", home, sfx)); else testutil_check(__wt_snprintf(buf, sizeof(buf), "%s", home)); - ret = wiredtiger_open(buf, &event_handler, NULL, &conn); + + /* + * Opening the database may cause a panic and core dump. Change dir to database directory so the + * core will be left someplace we will clean up. + */ + if (chdir(buf) != 0) + testutil_die(errno, "Child chdir: %s", home); + + ret = wiredtiger_open(NULL, &event_handler, NULL, &conn); /* * Not all out of sync combinations lead to corruption. We keep the previous checkpoint in the * file so some combinations of future or old turtle files and metadata files will succeed. @@ -496,7 +504,7 @@ main(int argc, char *argv[]) printf("corrupt metadata\n"); corrupt_file(WT_METAFILE, CORRUPT); testutil_check(__wt_snprintf( - buf, sizeof(buf), "cp -p %s/WiredTiger.wt ./%s.SAVE/WiredTiger.wt.CORRUPT", home, home)); + buf, sizeof(buf), "cp -p %s/WiredTiger.wt ./%s.%s/WiredTiger.wt.CORRUPT", home, home, SAVE)); printf("copy: %s\n", buf); if ((ret = system(buf)) < 0) testutil_die(ret, "system: %s", buf); @@ -508,26 +516,23 @@ main(int argc, char *argv[]) printf("corrupt turtle\n"); corrupt_file(WT_METADATA_TURTLE, WT_METAFILE_URI); testutil_check(__wt_snprintf(buf, sizeof(buf), - "cp -p %s/WiredTiger.turtle ./%s.SAVE/WiredTiger.turtle.CORRUPT", home, home)); + "cp -p %s/WiredTiger.turtle ./%s.%s/WiredTiger.turtle.CORRUPT", home, home, SAVE)); printf("copy: %s\n", buf); if ((ret = system(buf)) < 0) testutil_die(ret, "system: %s", buf); run_all_verification(NULL, &table_data[0]); - /* - * We need to set up the string before we clean up the structure. Then after the clean up we - * will run this command. - */ - testutil_check(__wt_snprintf(buf, sizeof(buf), "rm -rf core* %s*", home)); - testutil_cleanup(opts); - - /* - * We've created a lot of extra directories and possibly some core files from child process - * aborts. Manually clean them up. - */ + /* Remove saved copy of the original database directory. */ + testutil_check(__wt_snprintf(buf, sizeof(buf), "rm -rf %s.%s", home, SAVE)); printf("cleanup and remove: %s\n", buf); if ((ret = system(buf)) < 0) testutil_die(ret, "system: %s", buf); + /* + * Cleanup from test. This will delete the database directory along with the core files left + * there by our children. + */ + testutil_cleanup(opts); + return (EXIT_SUCCESS); } diff --git a/src/third_party/wiredtiger/test/evergreen.yml b/src/third_party/wiredtiger/test/evergreen.yml index f0354b089c1..b3b16040e9d 100755 --- a/src/third_party/wiredtiger/test/evergreen.yml +++ b/src/third_party/wiredtiger/test/evergreen.yml @@ -2091,6 +2091,17 @@ tasks: ./time_shift_test.sh /usr/local/lib/faketime/libfaketimeMT.so.1 0-1 2>&1 + - name: format-stress-pull-request-test + tags: ["pull_request"] + commands: + - func: "get project" + - func: "compile wiredtiger" + - func: "format test script" + vars: + smp_command: -j $(grep -c ^processor /proc/cpuinfo) + # run for 10 minutes. + format_test_script_args: -t 10 rows=10000 ops=50000 + - name: format-wtperf-test commands: - func: "get project" diff --git a/src/third_party/wiredtiger/test/format/bulk.c b/src/third_party/wiredtiger/test/format/bulk.c index 02e4cd404bd..d11d0060664 100644 --- a/src/third_party/wiredtiger/test/format/bulk.c +++ b/src/third_party/wiredtiger/test/format/bulk.c @@ -178,6 +178,8 @@ wts_load(void) } g.c_delete_pct += g.c_write_pct / 2; g.c_write_pct = g.c_write_pct / 2; + + break; } } |