[SERVER-40924] Add Evergreen task to sanity check fuzzer can parse JavaScript tests Created: 30/Apr/19  Updated: 29/Oct/23  Resolved: 28/May/19

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.4.22, 3.6.14, 4.1.13, 4.0.11

Type: Improvement Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Robert Guo (Inactive)
Resolution: Fixed Votes: 0
Labels: tig-evgconfig
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-41423 "shell: bash" being set incorrectly f... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0, v3.6, v3.4
Sprint: STM 2019-05-20, STM 2019-06-03
Participants:
Story Points: 3

 Description   

The mutational (jstestfuzz) fuzzer uses acorn to parse the JavaScript tests into an abstract syntax tree. We've had cases where a Server engineer attempts to use newer JavaScript features supported by the version of SpiderMonkey integrated into the mongo shell than the ECMAScript version we've configured acorn to parse the JavaScript as. This is because special handling for these features (e.g. class) may need to be done to rewrite the generated JavaScript to avoid uncatchable SyntaxErrors or strict-mode violations.

We should add a lint_fuzzer_sanity_patch Evergreen task to the Enterprise RHEL 6.2 required builder which takes the contents of the patch_files.txt file generated by the "get modified patch files" function and calls npm run parse-jstest on them. The lint_fuzzer_sanity_patch task should be declared in the requires section for the compile task such that scheduling the compile task (either implicitly or explicitly) implicitly schedules the lint_fuzzer_sanity_patch task.

We should also add lint_fuzzer_sanity_all Evergreen task to the (since removed) TIG Daily Cron build variant which calls npm run parse-jstest on the contents of the jstests/ and src/mongo/db/modules/enterprise/jstests directories. This is to handle how we cannot guarantee all commits to mongodb/mongo repository have a corresponding patch build, nor can we guarantee Evergreen schedules every commit to the mongodb/mongo repository. Having a periodic task (once a day) which checks all JavaScript tests means we don't need complicated logic like the burn_in_tests task to diff against the files changed since the commit the task last ran against in the mainline.



 Comments   
Comment by Githook User [ 20/Jun/19 ]

Author:

{'name': 'Robert Guo', 'email': 'robertguo@me.com', 'username': 'guoyr'}

Message: SERVER-41401 SERVER-40924 SERVER-40923 Add Evergreen task to sanity check fuzzer can parse JavaScript tests, remove npm test call
Branch: v3.4
https://github.com/mongodb/mongo/commit/e1d15dafee2ce7bbb239c7c665ed330a20c3af1e

Comment by Githook User [ 18/Jun/19 ]

Author:

{'name': 'Robert Guo', 'email': 'robert.guo@10gen.com', 'username': 'guoyr'}

Message: SERVER-41401 SERVER-40924 SERVER-40923 Add Evergreen task to sanity check fuzzer can parse JavaScript tests, remove npm test call
Branch: v3.6
https://github.com/mongodb/mongo/commit/91b898cb3748eeec0e0d181b2130952547883e27

Comment by Githook User [ 17/Jun/19 ]

Author:

{'name': 'Robert Guo', 'email': 'robertguo@me.com', 'username': 'guoyr'}

Message: SERVER-41401 SERVER-40924 SERVER-40923 Add Evergreen task to sanity check fuzzer can parse JavaScript tests, remove npm test call

(cherry picked from commit 8187520084f58882ab581e667464393e73c4f42a)
Branch: v4.0
https://github.com/mongodb/mongo/commit/9338342988c5850b14815ec5edb139115ed421dc

Comment by Githook User [ 28/May/19 ]

Author:

{'email': 'robertguo@me.com', 'name': 'Robert Guo', 'username': 'guoyr'}

Message: SERVER-40924 SERVER-40923 Add Evergreen task to sanity check fuzzer can parse JavaScript tests, remove npm test call

This reverts commit 4f034e89cc7978317d4a6ef34bc718a83ab55ecb.
Branch: master
https://github.com/mongodb/mongo/commit/8187520084f58882ab581e667464393e73c4f42a

Comment by Githook User [ 24/May/19 ]

Author:

{'email': 'robertguo@me.com', 'name': 'Robert Guo', 'username': 'guoyr'}

Message: Revert "SERVER-40924 SERVER-40923 Add Evergreen task to sanity check fuzzer can parse JavaScript tests, remove npm test call"

This reverts commit 0b39364ee1e923fd3e4e66f0e0bb0e57ca0deacd.
Branch: master
https://github.com/mongodb/mongo/commit/4f034e89cc7978317d4a6ef34bc718a83ab55ecb

Comment by Githook User [ 24/May/19 ]

Author:

{'email': 'robertguo@me.com', 'name': 'Robert Guo', 'username': 'guoyr'}

Message: SERVER-40924 update jstestfuzz invocation
Branch: master
https://github.com/mongodb/mongo/commit/007085f69da56e6b19858209aeed03371f99509f

Comment by Githook User [ 24/May/19 ]

Author:

{'name': 'Robert Guo', 'email': 'robertguo@me.com', 'username': 'guoyr'}

Message: SERVER-40924 fix jstestfuzz setup
Branch: master
https://github.com/mongodb/mongo/commit/d3b281fdb491a8289c54a2cf3b85c848d09fb05a

Comment by Githook User [ 23/May/19 ]

Author:

{'name': 'Robert Guo', 'email': 'robertguo@me.com', 'username': 'guoyr'}

Message: SERVER-40924 SERVER-40923 Add Evergreen task to sanity check fuzzer can parse JavaScript tests, remove npm test call.
Branch: master
https://github.com/mongodb/mongo/commit/0b39364ee1e923fd3e4e66f0e0bb0e57ca0deacd

Generated at Thu Feb 08 04:56:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.