JDK-7188787 : test/serviceability/ParserTest.java fails
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: hs24,7u40
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2012-08-02
  • Updated: 2013-08-30
  • Resolved: 2013-08-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Resolved
Related Reports
Relates :  
Relates :  
Description
% /net/sqenfs-1/export1/comp/vm/tool/jtreg/execution/solaris/bin/jtreg -testjdk:/java/re/jdk/8/latest/binaries/solaris-i586/fastdebug -va -javaoptions:'-server' serviceability
--------------------------------------------------
TEST: serviceability/ParserTest.java
JDK under test: (/java/re/jdk/8/latest/binaries/solaris-i586/fastdebug)
java version "1.8.0-ea-fastdebug"
Java(TM) SE Runtime Environment (build 1.8.0-ea-fastdebug-b49)
Java HotSpot(TM) Server VM (build 24.0-b16-fastdebug, mixed mode)

ACTION: compile -- Failed. Compilation failed: Compilation failed
REASON: User specified action: run compile -J-XX:+UnlockDiagnosticVMOptions -J-XX:+WhiteBoxAPI ParserTest.java 
TIME:   6.319 seconds
messages:
command: compile -J-XX:+UnlockDiagnosticVMOptions -J-XX:+WhiteBoxAPI /net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java
reason: User specified action: run compile -J-XX:+UnlockDiagnosticVMOptions -J-XX:+WhiteBoxAPI ParserTest.java 
elapsed time (seconds): 6.319
STDOUT:
STDERR:
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:10: error: package sun.hotspot.parser does not exist
import sun.hotspot.parser.DiagnosticCommand;
                         ^
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:11: error: package sun.hotspot.parser.DiagnosticCommand does not exist
import sun.hotspot.parser.DiagnosticCommand.DiagnosticArgumentType;
                                           ^
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:12: error: package sun.hotspot does not exist
import sun.hotspot.WhiteBox;
                  ^
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:15: error: cannot find symbol
    WhiteBox wb;
    ^
  symbol:   class WhiteBox
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:152: error: cannot find symbol
            String cmdLine, DiagnosticCommand[] argumentTypes) throws Exception {
                            ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:172: error: cannot find symbol
    private void shouldFail(String argument, DiagnosticCommand[] argumentTypes) throws Exception {
                                             ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:18: error: cannot find symbol
        wb = WhiteBox.getWhiteBox();
             ^
  symbol:   variable WhiteBox
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:33: error: cannot find symbol
        DiagnosticCommand arg = new DiagnosticCommand(name,
        ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:33: error: cannot find symbol
        DiagnosticCommand arg = new DiagnosticCommand(name,
                                    ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:34: error: cannot find symbol
                "desc", DiagnosticArgumentType.NANOTIME,
                        ^
  symbol:   variable DiagnosticArgumentType
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:36: error: cannot find symbol
        DiagnosticCommand[] args = {arg};
        ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:71: error: cannot find symbol
        DiagnosticCommand arg = new DiagnosticCommand(name,
        ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:71: error: cannot find symbol
        DiagnosticCommand arg = new DiagnosticCommand(name,
                                    ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:72: error: cannot find symbol
                "desc", DiagnosticArgumentType.JLONG,
                        ^
  symbol:   variable DiagnosticArgumentType
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:74: error: cannot find symbol
        DiagnosticCommand[] args = {arg};
        ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:85: error: cannot find symbol
        DiagnosticCommand arg = new DiagnosticCommand(name,
        ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:85: error: cannot find symbol
        DiagnosticCommand arg = new DiagnosticCommand(name,
                                    ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:86: error: cannot find symbol
                "desc", DiagnosticArgumentType.BOOLEAN,
                        ^
  symbol:   variable DiagnosticArgumentType
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:88: error: cannot find symbol
        DiagnosticCommand[] args = {arg};
        ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:101: error: cannot find symbol
        DiagnosticCommand arg1 = new DiagnosticCommand(name,
        ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:101: error: cannot find symbol
        DiagnosticCommand arg1 = new DiagnosticCommand(name,
                                     ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:102: error: cannot find symbol
                "desc", DiagnosticArgumentType.STRING,
                        ^
  symbol:   variable DiagnosticArgumentType
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:104: error: cannot find symbol
        DiagnosticCommand arg2 = new DiagnosticCommand("arg",
        ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:104: error: cannot find symbol
        DiagnosticCommand arg2 = new DiagnosticCommand("arg",
                                     ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:105: error: cannot find symbol
                "desc", DiagnosticArgumentType.STRING,
                        ^
  symbol:   variable DiagnosticArgumentType
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:107: error: cannot find symbol
        DiagnosticCommand[] args = {arg1, arg2};
        ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:129: error: cannot find symbol
        DiagnosticCommand arg = new DiagnosticCommand(name,
        ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:129: error: cannot find symbol
        DiagnosticCommand arg = new DiagnosticCommand(name,
                                    ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:130: error: cannot find symbol
                "desc", DiagnosticArgumentType.MEMORYSIZE,
                        ^
  symbol:   variable DiagnosticArgumentType
  location: class ParserTest
/net/irkutsk/export/home/kvn/work2/hg/6340864/test/serviceability/ParserTest.java:132: error: cannot find symbol
        DiagnosticCommand[] args = {arg};
        ^
  symbol:   class DiagnosticCommand
  location: class ParserTest
30 errors

TEST RESULT: Failed. Compilation failed: Compilation failed
--------------------------------------------------
Test results: failed: 1
Report written to /net/irkutsk/export/home/kvn/work2/hg/6340864/test/JTreport/html/report.html
Results written to /net/irkutsk/export/home/kvn/work2/hg/6340864/test/JTwork
Error: Some tests failed or other problems occurred.

Comments
All tests using whitebox API have been updated to correctly locate and use wb.jar.
30-08-2013

test failed with jdk7 too
16-01-2013

EVALUATION Whitebox related classes not copied to JDK image by default and is not available to test. it cause the test to fail.
11-08-2012

PUBLIC COMMENTS The test requires jre/lib/wb.jar be present in the VM running the test. While wb.jar is built as part of hotspot, as far as I can see it is not copied into the complete jre/jdk image and so will not be found in our official binaries. The test passes when run by JPRT.
02-08-2012