Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8244993

Revert changes to OutputAnalyzer stderrShouldBeEmptyIgnoreVMWarnings() that allow version strings

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      svc
    • Introduced In Version:
      15
    • Resolved In Build:
      b26

      Description

      Some serviceability tests were using stderrShouldBeEmpty() but other changes in the serviceability code were resulting in VM version information being printed to stderr. As a consequence JDK-8242009 chose to "enhance" stderrShouldBeEmptyIgnoreVMWarnings() to also ignore VM version strings.

      That is not appropriate in my opinion. We introduced stderrShouldBeEmptyIgnoreVMWarnings() to allow for tests that expect no output related to the test itself, but which needed to be tolerant of incidental output caused by VM warnings - which can, and do, occur, under various conditions. We do not normally expect random VM version strings to be produced on stderr or stdout so I do not find it appropriate to expand the method to also ignore those strings - especially when not evident in the methods name.

      I would first be looking at why the serviceability code is emitting these version strings, and if appropriate turn it off. I suggest reverting the behaviour of stderrShouldBeEmptyIgnoreVMWarnings() and adding a new method that allows more general filtering to be applied if needed. Or the tests should be updated to expect the VM version output if that is what the tools being tested will output.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dtitov Daniil Titov
                Reporter:
                dholmes David Holmes
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: