diff options
author | Siddhartha Mahajan <siddhartha.mahajan8899@mongodb.com> | 2023-01-06 01:18:45 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-01-06 02:01:19 +0000 |
commit | a3da082eef631bbb247ea5ffc24761fef1663b7e (patch) | |
tree | ea95d5903c89f6761bdb33aec6e0653da5b9de1c | |
parent | 206da68ef3b725bbc3a3b5555802f76f4ed0856d (diff) | |
download | mongo-a3da082eef631bbb247ea5ffc24761fef1663b7e.tar.gz |
Import wiredtiger: 827581cdd681a2415960ef3ac7470f17e43f751f from branch mongodb-master
ref: f71af27c5a..827581cdd6
for: 6.3.0-rc0
WT-10385 test_util parse tiered storage command line options to storage_source (-Po)
6 files changed, 29 insertions, 20 deletions
diff --git a/src/third_party/wiredtiger/dist/s_string.ok b/src/third_party/wiredtiger/dist/s_string.ok index 4cbe71ac288..8ea03b07941 100644 --- a/src/third_party/wiredtiger/dist/s_string.ok +++ b/src/third_party/wiredtiger/dist/s_string.ok @@ -363,6 +363,7 @@ PackOutputStream Pandis Phong PlatformSDK +Podir Pomy Posix PostgreSQL @@ -1623,6 +1624,7 @@ util utils uu vN +vPodir vPomy vW va diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 5d18f8728a1..ee6a453843a 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "f71af27c5a39b1490a5f78029d205280cfd03174" + "commit": "827581cdd681a2415960ef3ac7470f17e43f751f" } diff --git a/src/third_party/wiredtiger/test/csuite/wt9937_parse_opts/main.c b/src/third_party/wiredtiger/test/csuite/wt9937_parse_opts/main.c index d0440e074e4..3a1a216ffa3 100644 --- a/src/third_party/wiredtiger/test/csuite/wt9937_parse_opts/main.c +++ b/src/third_party/wiredtiger/test/csuite/wt9937_parse_opts/main.c @@ -118,11 +118,11 @@ static TEST_DRIVER driver[] = { {{"parse_opts", "-v", "-PT", NULL}, {NULL, "dir_store", NONZERO, NONZERO, true, true, 0}, {NULL, 0, 0, 0}}, - {{"parse_opts", "-v", "-Po", "my_store", "-PT", NULL}, - {NULL, "my_store", NONZERO, NONZERO, true, true, 0}, {NULL, 0, 0, 0}}, + {{"parse_opts", "-v", "-Po", "dir_store", "-PT", NULL}, + {NULL, "dir_store", NONZERO, NONZERO, true, true, 0}, {NULL, 0, 0, 0}}, - {{"parse_opts", "-vPomy_store", "-PT", NULL}, {NULL, "my_store", NONZERO, NONZERO, true, true, 0}, - {NULL, 0, 0, 0}}, + {{"parse_opts", "-vPodir_store", "-PT", NULL}, + {NULL, "dir_store", NONZERO, NONZERO, true, true, 0}, {NULL, 0, 0, 0}}, /* Setting random seeds can be done together or separately. */ {{"parse_opts", "-PT", "-PSE2345,D1234", NULL}, {NULL, "dir_store", 1234, 2345, true, false, 0}, @@ -138,20 +138,20 @@ static TEST_DRIVER driver[] = { * From here on, we are using some "extended" options, see previous comment. We set the argv[0] to * "parse_single_opt" to indicate to use the extended parsing idiom. */ - {{"parse_single_opt", "-vd", "-Pomy_store", "-c", "string_opt", "-PT", NULL}, - {NULL, "my_store", NONZERO, NONZERO, true, true, 0}, {(char *)"string_opt", true, false, 0}}, + {{"parse_single_opt", "-vd", "-Podir_store", "-c", "string_opt", "-PT", NULL}, + {NULL, "dir_store", NONZERO, NONZERO, true, true, 0}, {(char *)"string_opt", true, false, 0}}, - {{"parse_single_opt", "-dv", "-Pomy_store", "-cstring_opt", "-PT", NULL}, - {NULL, "my_store", NONZERO, NONZERO, true, true, 0}, {(char *)"string_opt", true, false, 0}}, + {{"parse_single_opt", "-dv", "-Podir_store", "-cstring_opt", "-PT", NULL}, + {NULL, "dir_store", NONZERO, NONZERO, true, true, 0}, {(char *)"string_opt", true, false, 0}}, - {{"parse_single_opt", "-ev", "-cstring_opt", "-Pomy_store", "-PT", "-f", "22", NULL}, - {NULL, "my_store", NONZERO, NONZERO, true, true, 0}, {(char *)"string_opt", false, true, 22}}, + {{"parse_single_opt", "-ev", "-cstring_opt", "-Podir_store", "-PT", "-f", "22", NULL}, + {NULL, "dir_store", NONZERO, NONZERO, true, true, 0}, {(char *)"string_opt", false, true, 22}}, - {{"parse_single_opt", "-evd", "-Pomy_store", "-PT", "-f22", NULL}, - {NULL, "my_store", NONZERO, NONZERO, true, true, 0}, {NULL, true, true, 22}}, + {{"parse_single_opt", "-evd", "-Podir_store", "-PT", "-f22", NULL}, + {NULL, "dir_store", NONZERO, NONZERO, true, true, 0}, {NULL, true, true, 22}}, - {{"parse_single_opt", "-v", "-Pomy_store", "-PT", NULL}, - {NULL, "my_store", NONZERO, NONZERO, true, true, 0}, {NULL, false, false, 0}}, + {{"parse_single_opt", "-v", "-Podir_store", "-PT", NULL}, + {NULL, "dir_store", NONZERO, NONZERO, true, true, 0}, {NULL, false, false, 0}}, }; /* diff --git a/src/third_party/wiredtiger/test/utility/misc.c b/src/third_party/wiredtiger/test/utility/misc.c index 98b788834cc..7a1d868a749 100644 --- a/src/third_party/wiredtiger/test/utility/misc.c +++ b/src/third_party/wiredtiger/test/utility/misc.c @@ -410,7 +410,8 @@ testutil_wiredtiger_open(TEST_OPTS *opts, const char *home, const char *config, if (opts->tiered_storage) testutil_check(__wt_snprintf(tiered_ext_cfg, sizeof(tiered_ext_cfg), TESTUTIL_ENV_CONFIG_TIERED_EXT TESTUTIL_ENV_CONFIG_TIERED, opts->build_dir, - benchmarkrun ? 0 : 2)); + opts->tiered_storage_source, opts->tiered_storage_source, benchmarkrun ? 0 : 2, + opts->tiered_storage_source)); testutil_check(__wt_snprintf(buf, sizeof(buf), "%s%s%s%s", config, (rerun ? TESTUTIL_ENV_CONFIG_REC : ""), (opts->compat ? TESTUTIL_ENV_CONFIG_COMPAT : ""), diff --git a/src/third_party/wiredtiger/test/utility/parse_opts.c b/src/third_party/wiredtiger/test/utility/parse_opts.c index 3f6cba8bac6..baee3c9500d 100644 --- a/src/third_party/wiredtiger/test/utility/parse_opts.c +++ b/src/third_party/wiredtiger/test/utility/parse_opts.c @@ -27,6 +27,7 @@ */ #include "test_util.h" #define DIR_STORE "dir_store" +#define S3_STORE "s3_store" extern char *__wt_optarg; /* argument associated with option */ extern int __wt_optind; @@ -106,6 +107,11 @@ parse_tiered_opt(TEST_OPTS *opts) EXPECT_OPTIONAL_ARG_IN_SUB_PARSE(opts); if (__wt_optarg == NULL || *__wt_optarg == '\0') testutil_die(EINVAL, "-Po option requires an argument"); + + if (strncmp(__wt_optarg, DIR_STORE, strlen(__wt_optarg)) != 0 && + strncmp(__wt_optarg, S3_STORE, strlen(__wt_optarg)) != 0) + testutil_die(EINVAL, "-Po not a valid argument"); + opts->tiered_storage_source = dstrdup(__wt_optarg); break; case 'S': diff --git a/src/third_party/wiredtiger/test/utility/test_util.h b/src/third_party/wiredtiger/test/utility/test_util.h index 20a38c42686..bbb6e48d033 100644 --- a/src/third_party/wiredtiger/test/utility/test_util.h +++ b/src/third_party/wiredtiger/test/utility/test_util.h @@ -51,10 +51,10 @@ #define TESTUTIL_ENV_CONFIG_TIERED \ ",tiered_storage=(bucket=./" \ - "bucket,bucket_prefix=pfx-,local_retention=%d,name=dir_store)" -#define TESTUTIL_ENV_CONFIG_TIERED_EXT \ - ",extensions=(%s/ext/storage_sources/dir_store/" \ - "libwiredtiger_dir_store.so=(early_load=true))" + "bucket,bucket_prefix=pfx-,local_retention=%d,name=%s)" +#define TESTUTIL_ENV_CONFIG_TIERED_EXT \ + ",extensions=(%s/ext/storage_sources/%s/" \ + "libwiredtiger_%s.so=(early_load=true))" #define TESTUTIL_ENV_CONFIG_REC \ ",log=(recover=on,remove=false),statistics=(all),statistics_log=(json,on_close,wait=1)" #define TESTUTIL_ENV_CONFIG_COMPAT ",compatibility=(release=\"2.9\")" |