JDK-8163974 : add invocation tests to colocated tests
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2016-08-12
  • Updated: 2022-07-15
  • Resolved: 2018-09-11
Related Reports
Relates :  
Description
Vladimir Ivanov wrote a set of invocation tests during JDK7 to create a master template for the expected results for invoke virtual, invoke interface and invoke special - based on the classfile version since the overriding rules changed in JDK7. Make sure that the test runs for at least one example classfile version <= 50, as well as for one classfile version >=51.

These tests need to be added to our jtreg colocated test suites
Comments
[~acorn] Karen, please let us know if you wish RT triage team to re-triage or reopen this issue given your recent findings.
17-05-2019

Here is my understanding of the current test results: To test CFV 50 I ran jdk6u45 -Xverify:none and JDK13kkpatch -XX:+UnlockDiagnosticVMOptions -XX:-BytecodeVerificationRemote 1. invokespecial - passed with 7u97/8u211/JDK10/JDK13kkpatch for current CFV for each passed CFV 50 examples 2. invokevirtual - passed with jdk7u97/8u211/JDK10/JDK13kkpatch CFV 50 resulting failures matched the master JDK6vsJDK7 expected behavior changes 3. invokeinterface - passed JDK7u97/JDK8u211/JDK10 JDK6 - SEGV - which at the time we decided not to go back and fix JDK13kkpatch: same set of failures for CFV 57 and CFV 50 I believe all of these changes were IAEs, and now are A.m, B.m or AME. I have attached the failed cases - the syntax is <result>/<expected result> - so I think we need to change the expected result not based on CFV but based on executing JDK version. In JDK1, as part of nestmates changes, we changed some of the invokeinterface behaviors which used to throw exceptions, to now succeed, and consciously choose to have those changes not be CFV sensitive.
17-05-2019

I ran on Linux with JDK6u45: with -Xverify:none: invokevirtual results were as expected (see expected failed tests above) invokespecial passed invokeinterface - test 10161: SEGV initialize_itable_for_interface. There have been several bugs in this area, likely this is 6645982 - closed as a dup of 4766270 - which were the changes to the spec, so appropriately not back ported to JDK6.
16-05-2019

I thought the tests were set up to run the class file versions <= 50 (JDK6) against the JDK6 expected results, but that is not what we are finding. 1. to run the test with cfv <= 50, you need to run -Xverify:none 2. Since this is being compared to JDK7 expectations, for invokevirtual results, the failed tests should match the attachment JDK6vsJDK7invokevirtual.txt There are three sets of tests - invokevirtual, invokespecial, invokeinterface. To run a cfv <= 50 for invokevirtual: #!/bin/sh mkdir run 2> /dev/null cd run JAVA=${JAVA_HOME}/bin/java CLASSPATH="../bin/classes:../lib/asm-analysis.jar:../lib/asmcommons.jar:../lib/asm.jar:../lib/asm-tree.jar:../lib/asm-util.jar:../lib/asm-xml.jar" $JAVA -version $JAVA -Xmx128M -Xverify:none -cp ${CLASSPATH} invokevirtual.Generator --classfile_version=${CLASSFILE_VER:-"50"}
16-05-2019

RT Triage team: This is not on our current list of priorities. We will considered this feature if we receive additional customer requirements.
11-09-2018

script to run invoke virtual for class file version 53: sh iv53.run.sh > iv53.out (scroll to end of output - should say EXECUTION STATUS: PASSED) iv53.run.sh: cd `dirname $0` mkdir run 2> /dev/null cd run JAVA=${JDK:-$JAVA_HOME}/bin/java $JAVA -version $JAVA \ -Xmx128M \ -cp \ ../bin/classes\ :../lib/asm-analysis.jar\ :../lib/asm-commons.jar\ :../lib/asm.jar\ :../lib/asm-tree.jar\ :../lib/asm-util.jar\ :../lib/asm-xml.jar\ \ $* \ invokevirtual.Generator --classfile_version=${CLASSFILE_VER:-"53"}
01-11-2017

Usage help for invocation tests: Supported parameters: --classfile_version=major_version[:minor_version] - specify class file version for generated classes --no_acc_super - don't add ACC_SUPER flag into generated classes --acc_super - force ACC_SUPER flag in generated classes --dump - dump generated classes --noexecute - print only expected results, don't execute tests
26-10-2017

Leave on JDK10. This is part of test colocation.
04-04-2017

Attaching tar file with original tests including scripts to run them.
12-08-2016