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

(test) jdk/test/lib/hexdump/HexPrinterTest.java fails on windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 15
    • 15
    • other-libs
    • b28

        [TestNG] Running:
          jdk/test/lib/hexdump/HexPrinterTest.java

        test jdk.test.lib.hexdump.HexPrinterTest.testASCII(): success
        Source: [B, off: 5, len: 22
        test jdk.test.lib.hexdump.HexPrinterTest.testBadToStringByteBuffer([B@4c1e6e3c, 5, 22): success
        Params: formatter: NONE, dest: java.io.PrintStream, offset: "", bytes: 16 x "%02x", delim: "", width: 64, nl: ""
        4142434445464748494a4b4c4d4e4f50c1c2c3c4c5c6c7c8c9cacbcccdcecfd0
        test jdk.test.lib.hexdump.HexPrinterTest.testBuiltins("minimal", "", "%02x", 16, "", 64, NONE, ""): success
        Params: formatter: PRINTABLE, dest: java.io.PrintStream, offset: "%08x ", bytes: 16 x "%02x ", delim: "|", width: 31, nl: "|\\r\\n"
        00000000 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 |ABCDEFGHIJKLMNOP|
        00000010 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf d0 |................|

        test jdk.test.lib.hexdump.HexPrinterTest.testBuiltins("canonical", "%08x ", "%02x ", 16, "|", 31, PRINTABLE, "|
        "): failure
        java.lang.AssertionError: offset format mismatch: 1 expected [00000010 ] but found [0000000 4]
        at org.testng.Assert.fail(Assert.java:94)
        at org.testng.Assert.failNotEquals(Assert.java:496)
        at org.testng.Assert.assertEquals(Assert.java:125)
        at org.testng.Assert.assertEquals(Assert.java:178)
        at jdk.test.lib.hexdump.HexPrinterTest.testParams(HexPrinterTest.java:139)
        at jdk.test.lib.hexdump.HexPrinterTest.testBuiltins(HexPrinterTest.java:98)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
        at org.testng.TestRunner.privateRun(TestRunner.java:773)
        at org.testng.TestRunner.run(TestRunner.java:623)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
        at org.testng.SuiteRunner.run(SuiteRunner.java:259)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
        at org.testng.TestNG.run(TestNG.java:1018)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
        at java.base/java.lang.Thread.run(Thread.java:832)
        Params: formatter: ASCII, dest: java.io.PrintStream, offset: "%5d: ", bytes: 16 x "%02x ", delim: " // ", width: 64, nl: "\\r\\n"
            0: 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 // ABCDEFGHIJKLMNOP
           16: c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf d0 // \\193\\194\\195\\196\\197\\198\\199\\200\\201\\202\\203\\204\\205\\206\\207\\208

        test jdk.test.lib.hexdump.HexPrinterTest.testBuiltins("simple", "%5d: ", "%02x ", 16, " // ", 64, ASCII, "
        "): failure
        java.lang.AssertionError: toString of simple does not match expected [formatter: ASCII, dest: java.io.PrintStream, offset: "%5d: ", bytes: 16 x "%02x ", delim: " // ", width: 64, nl: "\\n"] but found [formatter: ASCII, dest: java.io.PrintStream, offset: "%5d: ", bytes: 16 x "%02x ", delim: " // ", width: 64, nl: "\\r\\n"]
        at org.testng.Assert.fail(Assert.java:94)
        at org.testng.Assert.failNotEquals(Assert.java:496)
        at org.testng.Assert.assertEquals(Assert.java:125)
        at org.testng.Assert.assertEquals(Assert.java:178)
        at jdk.test.lib.hexdump.HexPrinterTest.testBuiltins(HexPrinterTest.java:107)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
        at org.testng.TestRunner.privateRun(TestRunner.java:773)
        at org.testng.TestRunner.run(TestRunner.java:623)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
        at org.testng.SuiteRunner.run(SuiteRunner.java:259)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
        at org.testng.TestNG.run(TestNG.java:1018)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
        at java.base/java.lang.Thread.run(Thread.java:832)
        Params: formatter: PRINTABLE, dest: java.io.PrintStream, offset: " ", bytes: 8 x "(byte)%3d, ", delim: " // ", width: 64, nl: "\\r\\n"
            (byte) 65, (byte) 66, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, // ABCDEFGH
            (byte)193, (byte)194, (byte)195, (byte)196, (byte)197, (byte)198, (byte)199, (byte)200, // ........

        test jdk.test.lib.hexdump.HexPrinterTest.testBuiltins("source", " ", "(byte)%3d, ", 8, " // ", 64, PRINTABLE, "
        "): failure
        java.lang.AssertionError: toString of source does not match expected [formatter: PRINTABLE, dest: java.io.PrintStream, offset: " ", bytes: 8 x "(byte)%3d, ", delim: " // ", width: 64, nl: "\\n"] but found [formatter: PRINTABLE, dest: java.io.PrintStream, offset: " ", bytes: 8 x "(byte)%3d, ", delim: " // ", width: 64, nl: "\\r\\n"]
        at org.testng.Assert.fail(Assert.java:94)
        at org.testng.Assert.failNotEquals(Assert.java:496)
        at org.testng.Assert.assertEquals(Assert.java:125)
        at org.testng.Assert.assertEquals(Assert.java:178)
        at jdk.test.lib.hexdump.HexPrinterTest.testBuiltins(HexPrinterTest.java:107)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
        at org.testng.TestRunner.privateRun(TestRunner.java:773)
        at org.testng.TestRunner.run(TestRunner.java:623)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
        at org.testng.SuiteRunner.run(SuiteRunner.java:259)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
        at org.testng.TestNG.run(TestNG.java:1018)
        at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
        at java.base/java.lang.Thread.run(Thread.java:832)
        Source: [B, off: 0, len: 21
            0: 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 // ABCDEFGHIJKLMNOP
           16: 51 52 53 54 55 // QRSTU

        test jdk.test.lib.hexdump.HexPrinterTest.testFormatByteBuffer([B@3d34ae0e, 0, -1): success
        Source: [B, off: 5, len: 12
            5: 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 // FGHIJKLMNOPQ

        test jdk.test.lib.hexdump.HexPrinterTest.testFormatByteBuffer([B@6744cd03, 5, 12): success
        Source: bytes, off: 0, len: 21
            0: 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 // ABCDEFGHIJKLMNOP
           16: 51 52 53 54 55 // QRSTU

        test jdk.test.lib.hexdump.HexPrinterTest.testFormatBytes([B@4522b330, 0, -1): success
        Source: bytes, off: 5, len: 12
            5: 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 // FGHIJKLMNOPQ

        test jdk.test.lib.hexdump.HexPrinterTest.testFormatBytes([B@3e492900, 5, 12): success
        Source: [B, off: 0, len: -1

        test jdk.test.lib.hexdump.HexPrinterTest.testFormatInputStream([B@4262828e, 0, -1): success
        Source: [B, off: 5, len: 12
            0: 41 42 43 44 45 46 47 48 49 4a 4b 4c // ABCDEFGHIJKL

        test jdk.test.lib.hexdump.HexPrinterTest.testFormatInputStream([B@6c9033ea, 5, 12): success
        test jdk.test.lib.hexdump.HexPrinterTest.testFormatter(byte, ""): success
        test jdk.test.lib.hexdump.HexPrinterTest.testFormatter(byte, "%02x: "): success
        test jdk.test.lib.hexdump.HexPrinterTest.testFormatter(short, "%d "): success
        test jdk.test.lib.hexdump.HexPrinterTest.testFormatter(int, "%08x, "): success
        test jdk.test.lib.hexdump.HexPrinterTest.testFormatter(long, "%16x "): success
        test jdk.test.lib.hexdump.HexPrinterTest.testFormatter(float, "%3.4f "): success
        test jdk.test.lib.hexdump.HexPrinterTest.testFormatter(double, "%6.3g "): success
        test jdk.test.lib.hexdump.HexPrinterTest.testFormatter(boolean, "%b "): success
            0: 41 42 43 44 c1 c2 c3 c4 //

        test jdk.test.lib.hexdump.HexPrinterTest.testHexPrinterPrimFormatter(byte, ""): success
            0: 41 42 43 44 c1 c2 c3 c4 // 41: 42: 43: 44: ffffffc1: ffffffc2: ffffffc3: ffffffc4:

        test jdk.test.lib.hexdump.HexPrinterTest.testHexPrinterPrimFormatter(byte, "%02x: "): success
            0: 41 42 43 44 c1 c2 c3 c4 // 16706 17220 -15934 -15420

        test jdk.test.lib.hexdump.HexPrinterTest.testHexPrinterPrimFormatter(short, "%d "): success
            0: 41 42 43 44 c1 c2 c3 c4 // 41424344, c1c2c3c4,

        test jdk.test.lib.hexdump.HexPrinterTest.testHexPrinterPrimFormatter(int, "%08x, "): success
            0: 41 42 43 44 c1 c2 c3 c4 // 41424344c1c2c3c4

        test jdk.test.lib.hexdump.HexPrinterTest.testHexPrinterPrimFormatter(long, "%16x "): success
            0: 41 42 43 44 c1 c2 c3 c4 // 12.1414 -24.3456

        test jdk.test.lib.hexdump.HexPrinterTest.testHexPrinterPrimFormatter(float, "%3.4f "): success
            0: 41 42 43 44 c1 c2 c3 c4 // 2.39e+06

        test jdk.test.lib.hexdump.HexPrinterTest.testHexPrinterPrimFormatter(double, "%6.3g "): success
            0: 41 42 43 44 c1 c2 c3 c4 // true true true true true true true true

        test jdk.test.lib.hexdump.HexPrinterTest.testHexPrinterPrimFormatter(boolean, "%b "): success
        4142434445464748c1c2c3c4c5c6c7c8
        test jdk.test.lib.hexdump.HexPrinterTest.testMinimalToStringByteArray(): success
        test jdk.test.lib.hexdump.HexPrinterTest.testNilPrinterBigBuffer(): success
        test jdk.test.lib.hexdump.HexPrinterTest.testNullByteArray(): success
        test jdk.test.lib.hexdump.HexPrinterTest.testNullByteArrayOff(): success
        test jdk.test.lib.hexdump.HexPrinterTest.testNullByteBuffer(): success
        test jdk.test.lib.hexdump.HexPrinterTest.testNullByteBufferOff(): success
        test jdk.test.lib.hexdump.HexPrinterTest.testNullInputStream(): success
        test jdk.test.lib.hexdump.HexPrinterTest.testPrintable(): success
        Source: [B, off: 0, len: 21
            0: 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 // ABCDEFGHIJKLMNOP
           16: 51 52 53 54 55 // QRSTU

        test jdk.test.lib.hexdump.HexPrinterTest.testToStringByteBuffer([B@1b098fc4, 0, -1): success
        Source: [B, off: 5, len: 12
            5: 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 // FGHIJKLMNOPQ

        test jdk.test.lib.hexdump.HexPrinterTest.testToStringByteBuffer([B@216d41a, 5, 12): success
        Params: formatter: PRINTABLE, dest: java.io.PrintStream, offset: "%4d: ", bytes: 10 x "%d ", delim: " ; ", width: 50, nl: "\\n"
           0: 65 66 67 68 69 70 71 72 73 74 ; ABCDEFGHIJ
          10: 193 194 195 196 197 198 199 200 201 202 ; ..........

        test jdk.test.lib.hexdump.HexPrinterTest.testToStringTwoLines("%4d: ", "%d ", 10, " ; ", 50, PRINTABLE, "
        "): success
        Params: formatter: (byte, ""), dest: java.io.PrintStream, offset: "%03o: ", bytes: 16 x "%d ", delim: " ; ", width: 50, nl: "\\n"
        000: 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 ;
        020: 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 ;

        test jdk.test.lib.hexdump.HexPrinterTest.testToStringTwoLines("%03o: ", "%d ", 16, " ; ", 50, (byte, ""), "
        "): success
        Params: formatter: (byte, ""), dest: java.io.PrintStream, offset: "%5d: ", bytes: 16 x "%02x:", delim: " ; ", width: 50, nl: "\\n"
            0: 41:42:43:44:45:46:47:48:49:4a:4b:4c:4d:4e:4f:50: ;
           16: c1:c2:c3:c4:c5:c6:c7:c8:c9:ca:cb:cc:cd:ce:cf:d0: ;

        test jdk.test.lib.hexdump.HexPrinterTest.testToStringTwoLines("%5d: ", "%02x:", 16, " ; ", 50, (byte, ""), "
        "): success
        Params: formatter: (byte, ""), dest: java.io.PrintStream, offset: "%5d: ", bytes: 16 x "%3d", delim: " ; ", width: 50, nl: "\\n"
            0: 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 ;
           16: 193194195196197198199200201202203204205206207208 ;

        test jdk.test.lib.hexdump.HexPrinterTest.testToStringTwoLines("%5d: ", "%3d", 16, " ; ", 50, (byte, ""), "
        "): success
        Params: formatter: (byte, ""), dest: java.io.PrintStream, offset: "%05o: ", bytes: 8 x "%3o", delim: " ; ", width: 50, nl: "\\n"
        00000: 101102103104105106107110 ;
        00010: 301302303304305306307310 ;

        test jdk.test.lib.hexdump.HexPrinterTest.testToStringTwoLines("%05o: ", "%3o", 8, " ; ", 50, (byte, ""), "
        "): success
        Params: formatter: (byte, "%d "), dest: java.io.PrintStream, offset: "%6x: ", bytes: 8 x "%02x", delim: " | ", width: 50, nl: "\\n"
             0: 4142434445464748 | 65 66 67 68 69 70 71 72
             8: c1c2c3c4c5c6c7c8 | -63 -62 -61 -60 -59 -58 -57 -56

        test jdk.test.lib.hexdump.HexPrinterTest.testToStringTwoLines("%6x: ", "%02x", 8, " | ", 50, (byte, "%d "), "
        "): success
        Params: formatter: PRINTABLE, dest: java.io.PrintStream, offset: "%2x: ", bytes: 8 x "%02x", delim: " | ", width: 50, nl: "\\n"
         0: 4142434445464748 | ABCDEFGH
         8: c1c2c3c4c5c6c7c8 | ........

        test jdk.test.lib.hexdump.HexPrinterTest.testToStringTwoLines("%2x: ", "%02x", 8, " | ", 50, PRINTABLE, "
        "): success
        Params: formatter: (short, "%d "), dest: java.io.PrintStream, offset: "%5d: ", bytes: 16 x "%02x", delim: " | ", width: 50, nl: "\\n"
            0: 4142434445464748494a4b4c4d4e4f50 | 16706 17220 17734 18248 18762 19276 19790 20304
           16: c1c2c3c4c5c6c7c8c9cacbcccdcecfd0 | -15934 -15420 -14906 -14392 -13878 -13364 -12850 -12336

        test jdk.test.lib.hexdump.HexPrinterTest.testToStringTwoLines("%5d: ", "%02x", 16, " | ", 50, (short, "%d "), "
        "): success

        ===============================================
        jdk/test/lib/hexdump/HexPrinterTest.java
        Total tests run: 46, Failures: 3, Skips: 0
        ===============================================

              rriggs Roger Riggs
              iignatyev Igor Ignatyev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: