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

Revert changes to OutputAnalyzer stderrShouldBeEmptyIgnoreVMWarnings() that allow version strings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 15
    • 15
    • hotspot
    • None
    • svc
    • 15
    • b26

      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.

            dtitov Daniil Titov (Inactive)
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: