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

java/lang/management/MemoryMXBean/Pending.java fails with -limitmods

XMLWordPrintable

      The test jdk/test/java/lang/management/MemoryMXBean/Pending.java is making invalid assumptions about the occurrences of GC, the occurrences of finalization, and the set of objects that might be eligible for finalization.
      The incorrecteness of those assumptions can be seen when the test fails with the -limitmods option as described below.


      The test current fails when supplying the appropriate "-limitmods":
      jtreg ... -javaoptions:"-limitmods jdk.management" java/lang/management/MemoryMXBean/Pending.java
      but passes with no "-limitmods".

      Wrong counts are printed when running failing. With "-limitmods":
         Before creating object: Current finalized = 0 Current pending = 0
         Afer creating objects with no ref: Current finalized = 13 Current pending = 45
         Afer creating objects with ref: Current finalized = 436 Current pending = 97
      Without the "-limitmods"::
         Before creating object: Current finalized = 0 Current pending = 0
         Afer creating objects with no ref: Current finalized = 0 Current pending = 0
         Afer creating objects with ref: Current finalized = 0 Current pending = 0

            Unassigned Unassigned
            shurailine Aleksandre Iline
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: