aqa-tests icon indicating copy to clipboard operation
aqa-tests copied to clipboard

cmdLineTester_reflectCache seesm to not work on jdk25

Open judovana opened this issue 4 weeks ago • 12 comments

    [javac]   where CAP#1 is a fresh type-variable:
    [javac]     CAP#1 extends Object from capture of ?
    [javac] /home/tester/aqa-tests/functional/cmdLineTests/reflectCache/src_15/test/reflectCache/Test_ReflectCache.java:107: error: cannot find symbol
    [javac] 			rootObject2 = unsafe.getObject(testConstructorB, constructorRootOffset);
    [javac] 			                    ^
    [javac]   symbol:   method getObject(Constructor<CAP#1>,long)
    [javac]   location: variable unsafe of type Unsafe
    [javac]   where CAP#1 is a fresh type-variable:
    [javac]     CAP#1 extends Object from capture of ?
    [javac] 8 errors

Considering the fate of unsafe.. Maybe to disable them?

I guess the fix willg o to https://github.com/eclipse-openj9/openj9/blob/master/test/functional/cmdLineTests/reflectCache/ ?

eg:

it diff
diff --git a/test/functional/cmdLineTests/reflectCache/playlist.xml b/test/functional/cmdLineTests/reflectCache/playlist.xml
index 805a907122..9050909df8 100644
--- a/test/functional/cmdLineTests/reflectCache/playlist.xml
+++ b/test/functional/cmdLineTests/reflectCache/playlist.xml
@@ -24,6 +24,12 @@
        <include>../variables.mk</include>
        <test>
                <testCaseName>cmdLineTester_reflectCache</testCaseName>
+               <disables>
+                       <disable>
+                               <comment>thisIssue</comment>
+                               <version>25+</version>
+                       </disable>
+               </disables>
                <variations>
                        <variation>NoOptions</variation>
                </variations>

judovana avatar Dec 02 '25 13:12 judovana

Are you trying to run this test on Hotspot? It's supposed to be specific to openj9/ibm. https://github.com/eclipse-openj9/openj9/blob/master/test/functional/cmdLineTests/reflectCache/playlist.xml#L42

pshipton avatar Dec 02 '25 13:12 pshipton

The test is passing on openj9 for jdk25. https://openj9-jenkins.osuosl.org/job/Test_openjdk25_j9_extended.functional_x86-64_linux_Nightly_testList_1/77/console

pshipton avatar Dec 02 '25 13:12 pshipton

hi! Yes, I had noted the <impl>openj9</impl> <impl>ibm</impl> lines, and was wondering why it keeps running on hotspot. The aqavit should disable it, shouldnt it?

judovana avatar Dec 02 '25 13:12 judovana

I'm not doing anything nasty.

export TEST_JDK_HOME=/usr/lib/jvm/java-25-openjdk/
export BUILD_LIST=functional
make compile # dies here
# make _functional

I thought the <impl> tag would exclude here. @pshipton anyway the isue is not for openj9/tests . Thanx!

judovana avatar Dec 02 '25 14:12 judovana

@sophia-guo Any ideas?

judovana avatar Dec 02 '25 14:12 judovana

What is the System.getProperty('java.vm.name') and System.getProperty('java.vendor') of the JDK under test? If those are undetermined, its possible we do not know that JDK_IMPL=hotspot

You can also try explicitly export JDK_IMPL=hotspot to see if the test will be excluded (which would be the expected behaviour if JDK_IMPL is known to be hotspot).

smlambert avatar Dec 03 '25 02:12 smlambert

Hi!!

|  Welcome to JShell -- Version 25.0.1
...
jshell> System.getProperty("java.vm.name")
$1 ==> "OpenJDK 64-Bit Server VM"
jshell>  System.getProperty("java.vendor")
$2 ==> "Red Hat, Inc."

in both local case (fedora portables/rpms), and in remote case (rhel portables/rpms). The export JDK_IMPL=hotspot did not helped. make compile still fails.

judovana avatar Dec 03 '25 09:12 judovana

@judovana - can you also try doing a make clean and then export DYNAMIC_COMPILE=true before retrying your steps ?

As I presume this is a case where we are trying to compile code that will not compile unless it is openj9, and the playlist really governs the execution phase, not the compile phase.

smlambert avatar Dec 03 '25 15:12 smlambert

export DYNAMIC_COMPILE=true` before retrying your steps ?

export TEST_JDK_HOME=/usr/lib/jvm/java-25-openjdk/
export BUILD_LIST=functional
# export JDK_IMPL=hotspot  # not needed anymore
export DYNAMIC_COMPILE=true
# make compile  # fails .. correctly? Error: cannot find the following tests: compile (note: group target such as sanity is not accepted inside testList)
make _functional  # now works as it should
....
FAILED test targets:
	ssl-tests_0 - Test results: passed: 4; failed: 1; did not meet platform requirements: 2 
		Failed test cases: 
TOTAL: 484   EXECUTED: 121   PASSED: 120   FAILED: 1   DISABLED: 22   SKIPPED: 341

Thanx for resolution. Is the export DYNAMIC_COMPILE=true recommended way then?

judovana avatar Dec 04 '25 09:12 judovana

Thanx for resolution. Is the export DYNAMIC_COMPILE=true recommended way then?

Yes, what that does is completely skip trying to compile stuff that is openj9 specific, when JDK_IMPL=hotspot I should have caught on faster to the problem.

smlambert avatar Dec 04 '25 20:12 smlambert

Thanx! Is there some documentation I can improve?

judovana avatar Dec 05 '25 10:12 judovana

Someone else is working on a documentation update that includes this topic (via https://github.com/adoptium/aqa-tests/issues/6772)

smlambert avatar Dec 11 '25 01:12 smlambert