[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-dev
Subject:    Re: RFR (XS) 8078295 - hotspot test_env.sh can set VM_CPU incorrectly
From:       Ioi Lam <ioi.lam () oracle ! com>
Date:       2015-09-30 22:19:17
Message-ID: 560C5FE5.6090906 () oracle ! com
[Download RAW message or body]

Hi Dean & Dmitry,

Thanks for the reviews.

I've tested using RBT on windows/mac/solaris/linux, as well as JPRT on 
all platforms (including embedded), so cygwin has been tested.

The INT_VERSION= output doesn't seem to confuse any scripts. I think 
it's better to have the "2>&1" in there. If vm_version.out is 
unavailable (due to file system corruption, etc) which would cause these 
subsequent lines to have incorrect values:

    echo "VM_TYPE=${VM_TYPE}"
    echo "VM_BITS=${VM_BITS}"
    echo "VM_OS=${VM_OS}"
    echo "VM_CPU=${VM_CPU}"

If this happens, the INT_VERSION= output will tells us what went wrong.

Thanks
- Ioi

On 9/30/15 12:32 PM, Dmitry Samersoff wrote:
> 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
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic