RFR: JDK-8072842 Add support for building native JTReg tests

Staffan Larsen staffan.larsen at oracle.com
Thu Feb 26 09:08:01 UTC 2015


As far as I can tell (I’m not a makefile expert) this looks good.

Thanks,
/Staffan

> On 25 feb 2015, at 12:21, Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com> wrote:
> 
> On 2015-02-11 13:08, Staffan Larsen wrote:
>> 
>>>>>>>> Okay so if I just cd into hotspot/test and use the Makefile to try
>>>>>>>> and run some jtreg tests it looks to me that it will define an
>>>>>>>> invalid -nativepath
>>>>>>> 
>>>>>>> I'm not sure if that is a supported use case. David or Staffan will
>>>>>>> have to answer to that. I have not tested that, only the "whole
>>>>>>> forest" approach.
>>>>>> 
>>>>>> I’ve never done that. I’m always running all make commands from the top
>>>>>> level. Is there a problem with that?
>>>>> 
>>>>> I must confess I also haven't done that - though I often run jtreg directly from there. Other hotspot engineers may use it. If nothing else it would be a way to test out what you expect JPRT to be running.
>>>>> 
>>>>> But perhaps we just don't add the -nativepath component if TESTNATIVE_DIR remains unset?
>>>> 
>>>> Not adding -nativepath or adding it with an empty path will lead to the same errors I think: tests that need native code will fail. So it does not really matter.
>>> 
>>> If you add it with an invalid path (won't be empty as the variable is only a prefix) then tests that don't need native code may also fail. Though I don't know how jtreg responds to a non-existent nativepath.
>> 
>> You are right. Jtreg validates the that the path is a directory. So better not to specify it.
> 
> Ok. I have updated the webrev, so the -nativepath: argument is only specified if we indeed have been given a valid path to the native libraries.
> 
> The only changes between this and the previous webrev is in hotspot/test/Makefile and jdk/test/Makefile.
> 
> http://cr.openjdk.java.net/~ihse/JDK-8072842-build-native-jtreg-tests/webrev.02 <http://cr.openjdk.java.net/~ihse/JDK-8072842-build-native-jtreg-tests/webrev.02>
> 
> /Magnus




More information about the core-libs-dev mailing list