[foreign] test target fails on windows

Jorn Vernee jbvernee at xs4all.nl
Wed Jan 16 15:51:11 UTC 2019


Ok. There seems to have been a build system change along the way that 
enforced that all test were being run. I remember the ClangFFI test 
suddenly started showing as a failure instead of vacuously passing. Any 
ways, running `make run-test-jdk_foreign` shows me the same number of 
passed tests (58, some are disabled on Windows). But I'll make sure to 
use that command from now on.

Jorn

Maurizio Cimadamore schreef op 2019-01-16 16:32:
> The way tests should be run is:
> 
> make run-test-jdk_foreign
> 
> this is the only way to make sure that all tests are ran (e.g.
> especially the ClangFFI test)
> 
> Maurizio
> 
> On 16/01/2019 15:06, Jorn Vernee wrote:
>> Yes, sorry. I have been using `disable-warnings-as-errors` since there 
>> was a warning generated by a change in jdk/jdk code a while ago which 
>> made `make images` fail. When I noticed the warnings, I had the intent 
>> of fixing them later, but I kind of forgot about about it :/
>> 
>> I think your fix looks fine. FWIW, it seems that larger-than-int enum 
>> constants are a GCC extension [1].
>> 
>> What about the other warning? I can't reproduce it currently, but I do 
>> remember seeing it some time (maybe only from clean build). I always 
>> use `make test TEST=jdk_foreign` to run the tests, I'm not sure if 
>> there is a difference with `make run-test-jdk_foreign`.
>> 
>> Jorn
>> 
>> [1] : https://stackoverflow.com/q/366017
>> 
>> Maurizio Cimadamore schreef op 2019-01-16 14:57:
>>> The following patch seems to fix the issue - Jorn, perhaps you have
>>> been building/running tests with 'disable-warnings-as-errors' ?
>>> 
>>> diff -r 364dc06dd3ed test/jdk/com/sun/tools/jextract/testEnum/enums.h
>>> --- a/test/jdk/com/sun/tools/jextract/testEnum/enums.h  Wed Jan 16
>>> 12:45:05 2019 +0000
>>> +++ b/test/jdk/com/sun/tools/jextract/testEnum/enums.h  Wed Jan 16
>>> 13:57:29 2019 +0000
>>> @@ -42,10 +42,17 @@
>>>     I_VALUE2 = -5345345
>>>  };
>>> 
>>> +#ifndef _WIN64
>>>  enum LongEnum {
>>>     L_VALUE1 = -4564565645L,
>>>     L_VALUE2 = 45645645645L
>>>  };
>>> +#else
>>> +enum LongEnum {
>>> +   L_VALUE1 = -5345345L,
>>> +   L_VALUE2 = -5345345
>>> +};
>>> +#endif
>>> 
>>>  EXPORT int i_value1_func();
>>>  EXPORT int i_value2_func();
>>> 
>>> Maurizio
>>> 
>>> On 16/01/2019 12:14, Maurizio Cimadamore wrote:
>>>> Hi,
>>>> I've tried to run tests on Windows the 'usual' way, but I get the 
>>>> following failures - is this something known?
>>>> 
>>>> c:\cygwin64\home\mcimadam\panama\closed\open\test\jdk\com\sun\tools\jextract\testenum\enums.h(46): 
>>>> error C2220: warning treated as error - no 'object' file generated
>>>> c:\cygwin64\home\mcimadam\panama\closed\open\test\jdk\com\sun\tools\jextract\testenum\enums.h(46): 
>>>> warning C4309: 'initializing': truncation of constant value
>>>> c:\cygwin64\home\mcimadam\panama\closed\open\test\jdk\com\sun\tools\jextract\testenum\enums.h(48): 
>>>> warning C4309: 'initializing': truncation of constant value
>>>> JtregNativeJdk.gmk:106: recipe for target 
>>>> '/cygdrive/c/cygwin64/home/mcimadam/panama/closed/build/windows-x64/support/test/jdk/jtreg/native/support/libEnums/libEnums.obj' 
>>>> failed
>>>> make[3]: *** 
>>>> [/cygdrive/c/cygwin64/home/mcimadam/panama/closed/build/windows-x64/support/test/jdk/jtreg/native/support/libEnums/libEnums.obj] 
>>>> Error 1
>>>> make[3]: *** Waiting for unfinished jobs....
>>>> c:/cygwin64/home/mcimadam/panama/closed/open/test/jdk/com/sun/tools/jextract/testStruct/libStruct.c(106): 
>>>> error C2220: warning treated as error - no 'object' file generated
>>>> c:/cygwin64/home/mcimadam/panama/closed/open/test/jdk/com/sun/tools/jextract/testStruct/libStruct.c(106): 
>>>> warning C4477: 'printf' : format string '%lu' requires an argument 
>>>> of type 'unsigned long', but variadic argument 1 has type '::size_t'
>>>> c:/cygwin64/home/mcimadam/panama/closed/open/test/jdk/com/sun/tools/jextract/testStruct/libStruct.c(106): 
>>>> note: consider using '%zu' in the format string
>>>> 
>>>> (**) - the way I run test is this:
>>>> 
>>>> make run-test-jdk_foreign
>>>> 
>>>> 


More information about the panama-dev mailing list