Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12111 [Umbrella] Split test-patch off into its own TLP
  3. HADOOP-12316

Potential false-positive and false-negative in parsing TAP output

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • HADOOP-12111
    • HADOOP-12111
    • yetus
    • None

    Description

      In tap.sh, TAP results are parsed as follows:

        filenames=$(find "${TAP_LOG_DIR}" -type f -exec "${GREP}" -l -E "not ok " {} \;)
      

      But this regex seems to have the following problems:

      1. According to the TAP specification, "ok" / "not ok" is only required in the test line and others are optional. So each line can be terminated with just "ok" or "not ok", without trailing spaces. In that case, the regex "not ok " will miss test failures.

      2. TAP output can contain descriptions and diagnostics. If they contains the string "not ok ", a false-alarm will be raised.

      They won't occur as far as we are using only bats, but considering supporting other test tools in the future, the regex should be replaced with "^not ok".

      Attachments

        Activity

          People

            sekikn Kengo Seki
            sekikn Kengo Seki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: