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

gtest death tests fail with unrecognized stderr output

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 17
    • 16
    • hotspot
    • b02

    Description

      I was confused when I found that simply passing -XX:+UseLargePages to the gtestlauncher breaks every death test.

      The reason is that UseLargePages causes a warning, unconditionally, on stderr if we have not enough huge pages to satisfy the VM initialization. That is harmless, however, these warnings appear to break gtest assert message regognition.

      That is a pity since it would be really useful to execute part of the gtests with +UseLargePages to test large page coding better (and a number of those tests could be useful even without huge pages available).

      =========
      $ cd build/linux-x64-debug
      $ JAVA_TOOL_OPTIONS=-XX:+UseLargePages make test-only TEST=gtest:SafepointLockAssertTest
      Building target 'test-only' in configuration 'linux-x64-debug'
      Test selection 'gtest:SafepointLockAssertTest', will run:
      * gtest:SafepointLockAssertTest/server

      Running test 'gtest:SafepointLockAssertTest/server'
      Note: Google Test filter = SafepointLockAssertTest*
      [==========] Running 4 tests from 1 test case.
      [----------] Global test environment set-up.
      [----------] 4 tests from SafepointLockAssertTest
      [ RUN ] SafepointLockAssertTest.always_check_vm_assert
      /jdk2/rum/open/test/hotspot/gtest/runtime/test_safepoint_locks.cpp:33: Failure
      Death test: child_SafepointLockAssertTest_always_check_()
          Result: died but not with expected error.
        Expected: ^assert failed: This lock should always have a safepoint check for Java threads
      Actual msg:
      [ DEATH ] Picked up JAVA_TOOL_OPTIONS: -XX:+UseLargePages
      [ DEATH ] Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
      [ DEATH ] Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
      [ DEATH ] Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
      [ DEATH ] Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
      [ DEATH ] Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
      [ DEATH ] Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
      [ DEATH ] assert failed: This lock should always have a safepoint check for Java threads: SFPT_Test_lock
      [ DEATH ]
      [ FAILED ] SafepointLockAssertTest.always_check_vm_assert (210 ms)


      Attachments

        Issue Links

          Activity

            People

              iklam Ioi Lam
              stuefe Thomas Stuefe
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: