Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commandline compilation broken for JDK21 functional tests #18620

Closed
smlambert opened this issue Dec 13, 2023 · 6 comments
Closed

commandline compilation broken for JDK21 functional tests #18620

smlambert opened this issue Dec 13, 2023 · 6 comments

Comments

@smlambert
Copy link
Contributor

Failure link

Public link to the failing test
and ideally extracting relevant info from the failed run (just enough info to run a Grinder), include:

  • test category, in Grinder equates to BUILD_LIST (functional, systemtest, openjdk, etc): functional
  • test target name, in Grinder equates to TARGET (testCaseName from playlist.xml, jdk_lang, jdk_net, etc): n/a
  • OS/architecture, in Grinder equates to Jenkinsfile (openjdk_x86-64_linux, openjdk_x86-64_windows, etc): all
  • public build SHAs (i.e. java -version output), in Grinder provides JDK_VERSION/JDK_IMPL info and helps identify point at which regression introduced: JDK_IMPL=hotspot, JDK_VERSION=21, OPENJ9_BRANCH=v0.41.0-release

Optional info

  • intermittent failure (yes|no): no
  • regression or new test: Failing in v0.41.0-release, though seems fixed in main
  • if regression, what are the last passing / first failing public SHAs (OpenJ9, OMR, JCL) :

Failure output (captured from console output)

Include test case name, stack trace output. If test fails with a crash, please include a link to the artifacts (xxxx_test_output.tar.gz) as they include the core/dmp files. Artifacts are either stored as an attachment to the CI server job itself or as a link from the job to an Artifactory location.

Run these steps to reproduce:

git clone --depth 1 --branch v0.9.6-release https://github.com/adoptium/aqa-tests
export TEST_JDK_HOME=/latestTemurinJDK21/bin
export USE_TESTENV_PROPERTIES=true
export JDK_VERSION=21
export JDK_IMPL=hotspot
export BUILD_LIST=functional

cd aqa-tests
./get.sh
cd TKG
make compile

Results in this error:

   [javac] /Users/[email protected]/work3/aqa-tests/functional/JIT_Test/src/jit/test/jar/JarTestClassLoader.java:35: error: cannot find symbol
    [javac] 			if (Compiler.compileClass(clazz) == false){
    [javac] 			    ^
    [javac]   symbol:   variable Compiler
    [javac]   location: class JarTestClassLoader
    [javac] /Users/[email protected]/work3/aqa-tests/functional/JIT_Test/src/jit/test/jar/ZipTestClassLoaderMT.java:322: error: cannot find symbol
    [javac] 			if ( Compiler.compileClass( clazz ) == false ) {
    [javac] 			     ^
    [javac]   symbol:   variable Compiler
    [javac]   location: class ZipTestClassLoaderMT

FYI @llxia

@hangshao0
Copy link
Contributor

Java.lang.Compiler has been removed on Java 21 and up, see #18430.
The change that updated the test #18571 is merged in master, 0.42.0 and 0.43.0 branches, not 0.41.0.

@pshipton
Copy link
Member

pshipton commented Dec 13, 2023

Right, use the aqa-tests j9.0.42-release branch for OpenJ9 Java 21.

@pshipton
Copy link
Member

Or use content for the 24_01 release.

@pshipton
Copy link
Member

@smlambert the tests won't run on Hotspot either. What we did was keep the native implementation for java.lang.Compiler, created a new test library to call them, and modified the tests to use the new helpers. The OpenJ9 helpers won't work on Hotspot, all the tests that use these natives will have to be excluded for Hotspot.

@pshipton
Copy link
Member

all the tests that use these natives will have to be excluded for Hotspot

Even on versions prior to jdk21.

@pshipton
Copy link
Member

Or rewrite the CompilerAccess.java helper to call java.lang.Compiler on versions prior to 21 so the tests can continue to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants