[Patch] libffi testsuite: Use correct type specifiers.

David Daney ddaney@avtrex.com
Wed Aug 8 15:19:00 GMT 2007


Andrew Haley wrote:
> David Daney writes:
>  > As noted in my previous message:
>  > http://gcc.gnu.org/ml/java-patches/2007-q3/msg00126.html
>  > 
>  > The libffi testsuite has many places where the wrong type specifier is 
>  > used.  This patch corrects all the erroneous specifiers that I could 
>  > find.  Also there was a definition in ffitest.h for ffi_type_mylong that 
>  > exactly mirrored a standard type definition found in ffi.h, so I removed 
>  > it and used the correct standard specifier instead.
>  > 
>  > Tested on x86_64-pc-linux-gnu (both native and -m32 ABIs) and 
>  > mips64-linux with no failures.
>  > 
>  > OK to commit?
>
> Some of these don't look right.  For example, cls_align_sint32.c is
> supposed to check structure alignment of sint32, but you changed it to
> int.
No.  Although its name would imply otherwise, that test checks the 
alignment of *int* fields within structures.  I didn't change that 
fact.  All I did was to make the libffi type specifiers accurately 
reflect the types of the parameters and return values.

>   It would make more sense to change "signed int" to sint32_t,
> wouldn't it?  Then the test would actually be doing what it says it's
> supposed to do.
>   
My understanding is that valid test cases should never be changed.  If 
one wants to test for something different, a new test case should be 
written.  The intent of my patch was to fix internal inconsistencies in 
the test cases with out changing what they were testing for.  I agree 
that it would make sense to add tests that check passing of fixed width 
integers, but that is not what this patch does.

David Daney



More information about the Java-patches mailing list