Karm / mandrel-integration-tests

Integration tests for GraalVM and its Mandrel distribution. Runs Quarkus, Helidon and Micronaut applications and small targeted reproducers. The focus is solely on native-image utility and compilation of Java applications into native executables.
Apache License 2.0
5 stars 3 forks source link

Add support for latest GraalVM version (JDK 22, 24.0.0-dev) #209

Closed jerboaa closed 9 months ago

jerboaa commented 9 months ago

native-image --version looks like this for JDK 22 based build:

native-image 22 2024-03-19
GraalVM Runtime Environment GraalVM CE 22-dev+15.1 (build 22+15-jvmci-b01)
Substrate VM GraalVM CE 22-dev+15.1 (build 22+15, serial gc)

This fails many tests, one basic test would be AppReproducersTest#versionsParsingMandrel, which fails with this as follows:

2023-10-02 18:58:06.845 INFO  [o.g.t.i.u.v.UsedVersion$MVersion] (runNativeImageVersion) Running command [native-image, --version] to determine Mandrel version used.
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.362 s <<< FAILURE! - in org.graalvm.tests.integration.AppReproducersTest
[ERROR] versionsParsingMandrel{TestInfo}  Time elapsed: 0.014 s  <<< ERROR!
java.lang.ExceptionInInitializerError
Caused by: java.lang.NullPointerException: Cannot invoke "String.toLowerCase()" because "version" is null

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Errors: 
[ERROR]   AppReproducersTest.versionsParsingMandrel » ExceptionInInitializer
[INFO] 
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Native image integration TS 1.0.0-SNAPSHOT:
[INFO] 
[INFO] Native image integration TS ........................ SUCCESS [  0.094 s]
[INFO] testsuite .......................................... FAILURE [  3.620 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.785 s
[INFO] Finished at: 2023-10-02T18:58:07+02:00
[INFO] ------------------------------------------------------------------------
zakkak commented 9 months ago

@jerboaa I don't think that mandrel-integration-tests are meant to be run with GraalVM CE builds, especially versionsParsingMandrel :).

IIRC there were other tests failing when doing so.

jerboaa commented 9 months ago

@zakkak Which tests are failing? IMO we should have some known set of tests that work. I know of at least some that are fine.

versionsParsingMandrel is a bad example as that is skipped for 23.1+. But DebugSymbolsTest#debugSymbolsSmokeGDB works fine with GraalVM Community for JDK 22 dev. So I think this is worth fixing.

zakkak commented 9 months ago

@zakkak Which tests are failing?

I don't recall, since it's something we don't test.

IMO we should have some known set of tests that work. I know of at least some that are fine. ... So I think this is worth fixing.

In that case we should also add those to our CI jobs, otherwise it's hard to keep track of what's expected to work and what's not.

jerboaa commented 9 months ago

IMO we should have some known set of tests that work. I know of at least some that are fine. ... So I think this is worth fixing.

In that case we should also add those to our CI jobs, otherwise it's hard to keep track of what's expected to work and what's not.

Yes, agreed.