Limit Java only tests to one architecture using jdk_test_arch

- Limit Java only tests to one architecture using jdk_test_arch
- OPENJDK-3185

Related: RHEL-73981
Related: RHEL-73559
This commit is contained in:
Andrew Hughes 2024-10-17 16:05:38 -04:00 committed by Thomas Fitzsimmons
parent 132db1ce0d
commit e77f6108c9

View File

@ -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 <gnu.andrew@redhat.com> - 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 <fitzsim@redhat.com> - 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