diff --git a/java-17-openjdk.spec b/java-17-openjdk.spec index ff36cf1..73bf7d7 100644 --- a/java-17-openjdk.spec +++ b/java-17-openjdk.spec @@ -155,6 +155,8 @@ %global svml_arches x86_64 # Set of architectures where we verify backtraces with gdb %global gdb_arches %{jit_arches} %{zero_arches} +# Architecture on which we run Java only tests +%global jdk_test_arch x86_64 # By default, we build a debug build during main build on JIT architectures %if %{with slowdebug} @@ -2012,6 +2014,9 @@ export JAVA_HOME=$(pwd)/%{installoutputdir -- ${suffix}} $JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -version %endif +# Only test on one architecture (the fastest) for Java only tests +%ifarch %{jdk_test_arch} + # Check unlimited policy has been used $JAVA_HOME/bin/javac -d . %{SOURCE13} $JAVA_HOME/bin/java --add-opens java.base/javax.crypto=ALL-UNNAMED TestCryptoLevel @@ -2029,6 +2034,26 @@ export SEC_DEBUG="-Djava.security.debug=properties" $JAVA_HOME/bin/java ${SEC_DEBUG} ${PROG} true $JAVA_HOME/bin/java ${SEC_DEBUG} -Djava.security.disableSystemPropertiesFile=true ${PROG} false +# Check src.zip has all sources. See RHBZ#1130490 +unzip -l $JAVA_HOME/lib/src.zip | grep 'sun.misc.Unsafe' + +# Check class files include useful debugging information +$JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from" +$JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable +$JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable + +# Check generated class files include useful debugging information +$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from" +$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable +$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable + +%else + +# Just run a basic java -version test on other architectures +$JAVA_HOME/bin/java -version + +%endif + # Check java launcher has no SSB mitigation if ! nm $JAVA_HOME/bin/java | grep set_speculation ; then true ; else false; fi @@ -2122,19 +2147,6 @@ EOF grep 'JavaCallWrapper::JavaCallWrapper' gdb.out %endif -# Check src.zip has all sources. See RHBZ#1130490 -unzip -l $JAVA_HOME/lib/src.zip | grep 'sun.misc.Unsafe' - -# Check class files include useful debugging information -$JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from" -$JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable -$JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable - -# Check generated class files include useful debugging information -$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from" -$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable -$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable - # build cycles check done @@ -2496,6 +2508,10 @@ cjc.mainProgram(args) %endif %changelog +* Fri Nov 29 2024 Andrew Hughes - 1:17.0.14.0.1-0.2.ea +- Limit Java only tests to one architecture using jdk_test_arch +- OPENJDK-3185 + * Fri Nov 29 2024 Thomas Fitzsimmons - 1:17.0.14.0.1-0.2.ea - Update to jdk-17.0.14+1 (EA) - Add to .gitignore openjdk-17.0.14+1-ea.tar.xz