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

resmoke.py cannot enable failpoints from commandline

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.1
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      STM 2019-11-14

      Description

      We can configure failpoints at startup with command line arguments thus:

      ./mongod --setParameter enableTestCommands=1  --setParameter failpoint.dummy='{ "mode" : "alwaysOn" }'
      

      So it should be possible to pass such command line args through resmoke.py, like:

      buildscripts/resmoke.py --mongodSetParameters '{"failpoint.dummy": {"mode": "alwaysOn"}}'
      

      This fails because resmoke doesn't know how to handle dotted parameter names when it generates the JavaScript that constructs TestData. Edited output:

      [js_test:rollback_drop_database] 2019-11-07T15:22:05.884-0500 Starting JSTest jstests/replsets/rollback_drop_database.js...
      mongo --eval TestData = new Object(); TestData.setParameters = new Object(); TestData.setParameters.failpoint.dummy = new Object(); TestData.setParameters.failpoint.dummy.mode = "alwaysOn"; jstests/replsets/rollback_drop_database.js
      [js_test:rollback_drop_database] 2019-11-07T15:22:07.489-0500 2019-11-07T15:22:07.489-0500 E  QUERY    [js] uncaught exception: TypeError: TestData.setParameters.failpoint is undefined :
      

      It tries to set TestData.setParameters.failpoint.dummy, but it hasn't created the "failpoint" property first.

      Either resmoke.py should create a TestData.setParameters property named "failpoint.dummy" with the dot included, or it should create a property named "failpoint" and then a property named "dummy", I'm not sure which.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: