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

TEST_BUG: jdk/java/util/prefs/ExportSubtree.java passes even when test should fail

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11.0.1
    • Fix Version/s: 13
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b06
    • Verification:
      Verified

      Backports

        Description

        When running the test jdk/java/util/prefs/ExportSubtree.java using jtreg the test passes even though the exported XML doesnt match the expected XML.

        The results shown in the .jtr file is:

        ----------System.out:(0/0)----------
        ----------System.err:(13/869)----------
        Jan 25, 2019 9:51:53 AM java.util.prefs.FileSystemPreferences$1 run
        INFO: Created user preferences directory.
        Jan 25, 2019 9:51:53 AM java.util.prefs.FileSystemPreferences$6 run
        WARNING: Prefs file removed in background ./.java/.userPrefs/prefs.xml
        java.io.IOException: exportSubtree does not output expected result
                at ExportSubtree.main(ExportSubtree.java:48)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.base/java.lang.reflect.Method.invoke(Method.java:567)
                at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
                at java.base/java.lang.Thread.run(Thread.java:835)
        STATUS:Passed.

        It seems that in the test there are 2 issues:

        1) The test checkes the actual vs. expected results and throws an exception but this is caught later in the code and prints a stackTrace - so test passes.
        2) The exported XML will never match the expected as we now export 'standalone="no" in the XML prologue, which isn't in the expected XML.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  sgroeger Steve Groeger
                  Reporter:
                  sgroeger Steve Groeger
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: