RFR (XS) 8078295 - hotspot test_env.sh can set VM_CPU incorrectly
Dmitry Samersoff
dmitry.samersoff at oracle.com
Wed Sep 30 19:32:13 UTC 2015
Ioi,
Looks good for me. (Assumed you are tested it under cygwin as well).
echo "INT_VERSION=`cat vm_version.out 2>&1`"
Actually you need not to redirect stderr to stdout here because cat
would print something to stderr only if vm_version.out doesn't exist
or unreadable.
-Dmitry
On 2015-09-29 22:18, Ioi Lam wrote:
> Please review a very small fix:
>
> http://cr.openjdk.java.net/~iklam/8078295_test_env_sh.01/
>
> Bug: [TESTBUG] hotspot test_env.sh can set VM_CPU incorrectly
>
> https://bugs.openjdk.java.net/browse/JDK-8078295
>
> Summary of fix:
>
> test_env.sh uses the following to get information such as VM_CPU
>
> ${TESTJAVA}${FS}bin${FS}java ${TESTOPTS} -Xinternalversion >
> vm_version.out 2>&1
>
> VM_CPU="unknown"
> grep "arm" vm_version.out > ${NULL}
> if [ $? = 0 ]
> then
> VM_CPU="arm"
> fi
>
> However, the internal version may contain arbitrary text (from the
> user name and pwd)
> such as "arm", which would cause VM_CPU to have incorrect value.
>
> The fix is to filter out the arbitrary text using a sed script
> (please see the bug report
> for details and sample output):
>
> ${TESTJAVA}${FS}bin${FS}java ${TESTOPTS} -Xinternalversion \
> | sed -e 's/[(][^)]*[)]//g' -e 's/ by "[^"]*"//g' \
> > vm_version.out 2>&1
>
> Tests:
>
> JPRT
> RBT, with the following tests
> hotspot/test/:hotspot_all
> vm.parallel_class_loading.testlist
> vm.regression.testlist
> vm.runtime.testlist
> vm.tmtools.testlist)
>
> Thanks
> - Ioi
--
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.
More information about the hotspot-dev
mailing list