JDK-8078295 : [TESTBUG] hotspot test_env.sh can set VM_CPU incorrectly
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-04-21
  • Updated: 2015-12-03
  • Resolved: 2015-10-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b89Fixed
Related Reports
Relates :  
Description
Some tests, like Test8017498.sh, depend on VM_CPU being set correctly.  VM_CPU is based on running "grep" on the output of -Xinternalversion.  The problem is the internal version contains other information that can be mistaken for a cpu name.  For example, a JPRT build has an internal version with the format <job id>.<username>.<repo name>, so you can easily get test failures if your username or repo name contain a string that test_env.sh is grepping for.  Looks like the same problem exists for VM_OS and VM_TYPE.
Comments
Proposed fix: ======================= hg diff test_env.sh diff -r a7a8c4a7d728 test/test_env.sh --- a/test/test_env.sh Sat Sep 19 15:04:36 2015 -0700 +++ b/test/test_env.sh Mon Sep 28 15:15:10 2015 -0700 @@ -111,7 +111,7 @@ exit 1 fi -${TESTJAVA}${FS}bin${FS}java ${TESTOPTS} -Xinternalversion > vm_version.out 2>&1 +${TESTJAVA}${FS}bin${FS}java ${TESTOPTS} -Xinternalversion | sed -e 's/[(][^)]*[)]//g' -e 's/ by "[^"]*"//g' > vm_version.out 2>&1 VM_TYPE="unknown" grep "Server" vm_version.out > ${NULL} ======================= TEST: the "sed" command will eliminate the words inside the parenthesis and the "by XXX" part, which may contain arbitrary strings. $ java -Xinternalversion Java HotSpot(TM) 64-Bit Server VM (1.9.0-internal-iklam_2015_09_19_15_08-b00) for linux-amd64 JRE (1.9.0-internal-iklam_2015_09_19_15_08-b00), built on Sep 25 2015 09:49:19 by "iklam" with gcc 4.8.2 $ java -Xinternalversion | sed -e 's/[(][^)]*[)]//g' -e 's/ by "[^"]*"//g' Java HotSpot 64-Bit Server VM for linux-amd64 JRE , built on Sep 25 2015 09:49:19 with gcc 4.8.2 $ java -Xinternalversion Java HotSpot(TM) Server VM (1.9.0-internal-fastdebug-20150926024657.iklam.appcdsv2-b00) for linux-x86 JRE (1.9.0-internal-20150926024657.iklam.appcdsv2-b00), built on Sep 26 2015 03:17:23 by "jprtadm" with gcc 4.8.2 $ java -Xinternalversion | sed -e 's/[(][^)]*[)]//g' -e 's/ by "[^"]*"//g' Java HotSpot Server VM for linux-x86 JRE , built on Sep 26 2015 03:17:23 with gcc 4.8.2
29-09-2015

http://aurora.ru.oracle.com/functional/faces/RunDetails.xhtml?names=1102668.JAVASE.NIGHTLY.VM.Comp_Baseline-Tiered.2015-08-31-6 RULE "runtime/jsig/Test8017498.sh" Exception java.lang.UnsatisfiedLinkError: ...: ...: wrong ELF class: ELFCLASS32 RULE "runtime/jsig/Test8017498.sh" ExitCode 1
01-09-2015