diff options
-rw-r--r-- | buildscripts/resmokelib/configure_resmoke.py | 17 | ||||
-rw-r--r-- | buildscripts/resmokelib/mongod_fuzzer_configs.py | 30 | ||||
-rw-r--r-- | etc/evergreen.yml | 8 |
3 files changed, 48 insertions, 7 deletions
diff --git a/buildscripts/resmokelib/configure_resmoke.py b/buildscripts/resmokelib/configure_resmoke.py index 06fe4b479d3..34eb2295b2e 100644 --- a/buildscripts/resmokelib/configure_resmoke.py +++ b/buildscripts/resmokelib/configure_resmoke.py @@ -250,8 +250,9 @@ def _update_config_vars(values): # pylint: disable=too-many-statements,too-many _config.CONFIG_FUZZ_SEED = random.randrange(sys.maxsize) else: _config.CONFIG_FUZZ_SEED = int(_config.CONFIG_FUZZ_SEED) - _config.MONGOD_SET_PARAMETERS, _config.WT_ENGINE_CONFIG = mongod_fuzzer_configs \ - .fuzz_set_parameters(_config.CONFIG_FUZZ_SEED, _config.MONGOD_SET_PARAMETERS) + _config.MONGOD_SET_PARAMETERS, _config.WT_ENGINE_CONFIG, _config.WT_COLL_CONFIG, \ + _config.WT_INDEX_CONFIG = mongod_fuzzer_configs.fuzz_set_parameters( + _config.CONFIG_FUZZ_SEED, _config.MONGOD_SET_PARAMETERS) _config.MONGOS_EXECUTABLE = _expand_user(config.pop("mongos_executable")) @@ -324,12 +325,16 @@ def _update_config_vars(values): # pylint: disable=too-many-statements,too-many _config.ARCHIVE_LIMIT_MB = config.pop("archive_limit_mb") _config.ARCHIVE_LIMIT_TESTS = config.pop("archive_limit_tests") - # Wiredtiger options. - _config.WT_COLL_CONFIG = config.pop("wt_coll_config") + # Wiredtiger options. Prevent fuzzed wt configs from being overwritten unless user specifies it. wt_engine_config = config.pop("wt_engine_config") - if wt_engine_config: # prevents fuzzed wt_engine_config from being overwritten unless user specifies it + if wt_engine_config: _config.WT_ENGINE_CONFIG = config.pop("wt_engine_config") - _config.WT_INDEX_CONFIG = config.pop("wt_index_config") + wt_coll_config = config.pop("wt_coll_config") + if wt_coll_config: + _config.WT_COLL_CONFIG = config.pop("wt_coll_config") + wt_index_config = config.pop("wt_index_config") + if wt_index_config: + _config.WT_INDEX_CONFIG = config.pop("wt_index_config") # Benchmark/Benchrun options. _config.BENCHMARK_FILTER = config.pop("benchmark_filter") diff --git a/buildscripts/resmokelib/mongod_fuzzer_configs.py b/buildscripts/resmokelib/mongod_fuzzer_configs.py index e0a3beff643..86d969b0b02 100644 --- a/buildscripts/resmokelib/mongod_fuzzer_configs.py +++ b/buildscripts/resmokelib/mongod_fuzzer_configs.py @@ -34,6 +34,33 @@ def generate_eviction_configs(rng): close_scan_interval) +def generate_table_configs(rng): + """Generate random configurations for WiredTiger tables.""" + + # TODO(SERVER-60747): Add fuzzing for leaf_page_max + + internal_page_max = rng.choice([4, 8, 12, 1024, 10 * 1024]) * 1024 + leaf_value_max = rng.choice([1, 32, 128, 256]) * 1024 * 1024 + + memory_page_max_lower_bound = 16 * 1024 # leaf_page_max + # Assume WT cache size of 1GB as most MDB tests specify this as the cache size. + memory_page_max_upper_bound = round( + (rng.randint(256, 1024) * 1024 * 1024) / 10) # cache_size / 10 + memory_page_max = rng.randint(memory_page_max_lower_bound, memory_page_max_upper_bound) + + split_pct = rng.choice([50, 60, 75, 100]) + prefix_compression = rng.choice(["true", "false"]) + block_compressor = rng.choice(["none", "snappy", "zlib", "zstd"]) + + return "block_compressor={0},internal_page_max={1},leaf_value_max={2},memory_page_max={3},"\ + "prefix_compression={4},split_pct={5}".format(block_compressor, + internal_page_max, + leaf_value_max, + memory_page_max, + prefix_compression, + split_pct) + + def generate_flow_control_parameters(rng): """Generate parameters related to flow control and returns a dictionary.""" configs = {} @@ -78,4 +105,5 @@ def fuzz_set_parameters(seed, user_provided_params): for key, value in utils.load_yaml(user_provided_params).items(): ret[key] = value - return utils.dump_yaml(ret), generate_eviction_configs(rng) + return utils.dump_yaml(ret), generate_eviction_configs(rng), generate_table_configs(rng), \ + generate_table_configs(rng) diff --git a/etc/evergreen.yml b/etc/evergreen.yml index 82ac4bfbc2e..45c2c3146ea 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -9491,6 +9491,14 @@ buildvariants: - name: .concurrency .large !.ubsan !.no_txns !.debug_only distros: - rhel80-medium + - name: config_fuzzer_concurrency + - name: config_fuzzer_concurrency_replication + distros: + - rhel80-large + - name: config_fuzzer_jsCore + - name: config_fuzzer_replica_sets_jscore_passthrough + distros: + - rhel80-large - name: disk_wiredtiger - name: .encrypt - name: idl_tests |