Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-9872

Perform input validation in cppsuite/create_test.sh

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • WT11.2.0, 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 3
    • Storage Engines - 2022-12-12

      We create new cppsuite tests by calling the cppsuite/create_test.sh command, and it takes one argument which is the name of the new test. This script will then make a copy of our test template files and insert this new name into the template.

      However, we currently don't perform any validation on this name and if a non C++ compliant name is provided we'll create the new test files but they won't be able to compile and the user needs to revert the changes and start again. We should perform validation in the script before we get to this stage.

      Some example failing inputs:
      create_test.sh "name with space" // C++ class names can't have spaces
      create_test.sh }}{{"9512_test" // C++ class names can't begin with numbers

            Assignee:
            lachlan.ting@mongodb.com Lachlan Ting (Inactive)
            Reporter:
            andrew.morton@mongodb.com Andrew Morton
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: