Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-40924

Add Evergreen task to sanity check fuzzer can parse JavaScript tests

    • Fully Compatible
    • v4.0, v3.6, v3.4
    • STM 2019-05-20, STM 2019-06-03
    • 3

      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.

            robert.guo@mongodb.com Robert Guo (Inactive)
            max.hirschhorn@mongodb.com Max Hirschhorn
            0 Vote for this issue
            3 Start watching this issue