Operational Defect Database

BugZero found this defect 144 days ago.

MongoDB | 2533135

resmoke no longer errors if given a nonexistent JavaScript file at the command line

Last update date:

3/12/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

The changes from c019228 as part of SERVER-68699 cause resmoke to no longer error when given a nonexistent JavaScript file at the command line. This is confusing behavior to engineers who mistyped the path to a JavaScript file (e.g. a JavaScript file generated by the fuzzer). Steps to reproduce $ python buildscripts/resmoke.py run --suite=core does_not_exist.js ... [executor] 15:02:58.060Z Skipping js_test, no tests to run [resmoke] 15:02:58.060Z ================================================================================ [resmoke] 15:02:58.060Z Summary of core suite: No tests ran. Suite did not run any tests. [resmoke] 15:02:58.060Z Exiting with code: 0 The prior and expected output would instead be the following: Traceback (most recent call last): File "/home/ubuntu/mongo/buildscripts/resmoke.py", line 20, in entrypoint() File "/home/ubuntu/mongo/buildscripts/resmoke.py", line 16, in entrypoint cli.main(sys.argv) File "/home/ubuntu/mongo/buildscripts/resmokelib/cli.py", line 32, in main subcommand.execute() File "/home/ubuntu/mongo/buildscripts/resmokelib/run/__init__.py", line 132, in execute self.run_tests() File "/home/ubuntu/mongo/buildscripts/resmokelib/run/__init__.py", line 244, in run_tests suites = self._get_suites() File "/home/ubuntu/mongo/buildscripts/resmokelib/run/__init__.py", line 616, in _get_suites return suitesconfig.get_suites(config.SUITE_FILES, config.TEST_FILES) File "/home/ubuntu/mongo/buildscripts/resmokelib/suitesconfig.py", line 115, in get_suites for test in override_suite.tests: File "/home/ubuntu/mongo/buildscripts/resmokelib/testing/suite.py", line 103, in tests self._tests, self._excluded = self._get_tests_for_kind(self.test_kind) File "/home/ubuntu/mongo/buildscripts/resmokelib/testing/suite.py", line 125, in _get_tests_for_kind return _selector.filter_tests(test_kind, selector_config) File "/home/ubuntu/mongo/buildscripts/resmokelib/selector.py", line 801, in filter_tests return selector.select(selector_config) File "/home/ubuntu/mongo/buildscripts/resmokelib/selector.py", line 509, in select return _Selector.select(self, selector_config) File "/home/ubuntu/mongo/buildscripts/resmokelib/selector.py", line 460, in select test_list = _TestList(self._test_file_explorer, roots, self._tests_are_files) File "/home/ubuntu/mongo/buildscripts/resmokelib/selector.py", line 167, in __init__ self._roots = self._expand_files(roots) if tests_are_files else roots File "/home/ubuntu/mongo/buildscripts/resmokelib/selector.py", line 177, in _expand_files raise ValueError("Unrecognized test file: {}".format(test)) ValueError: Unrecognized test file: does_not_exist.js

Top User Comments

max.hirschhorn@10gen.com commented on Wed, 27 Dec 2023 15:46:42 +0000: The changes from c019228 as part of SERVER-68699 also removed the *[aA]uth*.js related glob patterns. While these glob patterns may not currently match any files in certain directories, it is a well-established convention for any files containing the word "auth" to be excluded from auth passthroughs. I would advocate for these glob patterns to be restored in case a matching file is added/moved into these test suites in the future.

Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Backlog

Learn More

Search:

...