RFR(S) 8021296 : [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases

Daniel D. Daugherty daniel.daugherty at oracle.com
Tue Jul 30 06:37:27 PDT 2013


 > http://cr.openjdk.java.net/~ccheung/8021296/webrev/

How about this for the message in all three tests:

echo "WARNING: gcc not found. Cannot execute test." 2>&1

test/runtime/6929067/Test6929067.sh
Needs an "@bug 8021296" entry.

test/runtime/7107135/Test7107135.sh
     Needs an "@bug 8021296" entry.

test/runtime/jsig/Test8017498.sh
     No comments.

test/runtime/jsig/TestJNI.c
     No comments.

Dan


On 7/29/13 6:58 PM, Calvin Cheung wrote:
> Dan, Coleen, Yumin, Dean,
>
> Thanks for your review.
> I've made 2 changes to the webrev:
> 1) check the existence of gcc earlier;
> 2) simplify sig_handler() - it's now a dummy handler since there's no 
> signal being raised for this test case.
>
> Updated webrev at:
>     http://cr.openjdk.java.net/~ccheung/8021296/webrev/
>
> Calvin
>
> On 7/29/2013 5:04 PM, Yumin Qi wrote:
>>
>> On 7/26/2013 5:58 PM, Dean Long wrote:
>>> This looks wrong.  For 32-bit, you probably want REG_EIP, and to 
>>> change the "6" into the correct instruction size for x86.
>> Agree it should be REG_EIP.
>>> Or disable the test for 32-bit. Otherwise the comment:
>>>
>>>   43     // Move forward to skip failing instruction
>>>
>>> isn't correct and you won't skip the failing instruction.
>>>
>> I think it does not matter here for a test case since this handler 
>> never executed in test case. It only tests if installing the signal 
>> handler for a sig no > MAXSIGNUM works.
>> The ip stored in
>>
>> context->uc_mcontext.gregs[TEST_REG];
>>
>> Is the one when sig was raised, and when signal handler returns, it 
>> should go back to
>> context->uc_link->uc_mcontext.gregs[TEST_REG];
>>
>> I don't understand why set context->uc_mcontext.gregs[TEST_REG] here 
>> since it will not take this address when signal handler returns.  
>> Since we have no idea what the size of next instruction is, 6 is not 
>> a good number anyway. As a test case, just a print out message is OK. 
>> So we can just remove the setting.
>>
>> Yumin
>>> On 7/26/2013 4:06 PM, Calvin Cheung wrote:
>>>> Please review this small fix for a testcase bug.
>>>>
>>>> webrev: http://cr.openjdk.java.net/~ccheung/8021296/webrev/
>>>>
>>>> JBS: https://jbs.oracle.com/bugs/browse/JDK-8021296
>>>> bug: http://bugs.sun.com/view_bug.do?bug_id=8021296
>>>>
>>>> Fixing 2 issues:
>>>> 1) gcc not found on the test machine
>>>>     In the sh script, check for if gcc exists. If it doesn't exist, 
>>>> declare the test as "Passed".
>>>> 2) REG_RIP undeclared
>>>>     REG_RIP is only defined for 64-bit linux. The compile failure 
>>>> was seen on 32-bit platform.
>>>>     The fix is to check for 64-bit platform - use REG_RIP for 
>>>> 64-bit and REG_EFL for 32-bit.
>>>>     They both have a value of 16.
>>>>
>>>> Testing:
>>>>     Ran jtreg on the testcases and making sure it reports "Passed" 
>>>> if gcc isn't found.
>>>>
>>>> thanks,
>>>> Calvin
>>>>
>>>>
>>>>
>>>>
>>>
>>
>



More information about the hotspot-runtime-dev mailing list