Bug 11411 - libffi testing problems
Summary: libffi testing problems
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libffi (show other bugs)
Version: 3.4.0
: P3 enhancement
Target Milestone: 3.4.0
Assignee: Andreas Tobler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-02 18:29 UTC by Rainer Orth
Modified: 2005-02-23 13:49 UTC (History)
1 user (show)

See Also:
Host: sparc-sun-solaris2.8
Target: *-*-*
Build: sparc-sun-solaris2.8
Known to work:
Known to fail:
Last reconfirmed: 2003-09-04 15:04:25


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Orth 2003-07-02 18:29:24 UTC
Although libffi has a separate test program (libffi), this isn't currently
run during make check.  It has to be invoked manually (and may even need to
set LD_LIBRARY_PATH so libgcc_s.so is found at runtime).  This is
inconvenient and can easily lead to overlooking bugs in libffi.

Environment:
System: SunOS tikal 5.8 Generic_108528-19 sun4u sparc SUNW,Sun-Blade-1000
Architecture: sun4

	
host: sparc-sun-solaris2.8
build: sparc-sun-solaris2.8
target: sparc-sun-solaris2.8
configured with: /vol/gnu/src/gcc/gcc-dist/configure --prefix=/vol/gcc --with-local-prefix=/vol/gcc --disable-nls

How-To-Repeat:
Run make check in libffi.
Comment 1 Rainer Orth 2003-07-02 18:29:24 UTC
Fix:
Even if ffitest were run by make check, the output can easily be overlooked
in the output of a whole make check run.  To fix this, ffitest should be
integrated into the dejagenu framework so test results show up in the
testsuite report.

Even better, instead of having a single monolithic test (which can only
produce a single PASS or FAIL result), ffitest should be split into several
independant tests to get a better overview of libffi functionality/problems.
Comment 2 Andrew Pinski 2003-08-05 01:10:47 UTC
I can confirm ffitest does not run.  It also does not print out the same format as the other 
tests also.
Comment 3 Andreas Tobler 2003-08-27 15:15:08 UTC
Started to fix this, a draft can be found below.

http://gcc.gnu.org/ml/gcc-patches/2003-08/msg01701.html

Comment 4 GCC Commits 2003-09-04 14:47:09 UTC
Subject: Bug 11411

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	andreast@gcc.gnu.org	2003-09-04 14:47:05

Modified files:
	libffi         : ChangeLog Makefile.am Makefile.in configure.in 
	                 configure 

Log message:
	003-09-04  Andreas Tobler  <a.tobler@schweiz.ch>
	
	* Makefile.am: Add dejagnu test framework. Fixes PR other/11411.
	* Makefile.in: Rebuilt.
	* configure.in: Add dejagnu test framework.
	* configure: Rebuilt.
	
	* testsuite/Makefile.am: New file.
	* testsuite/Makefile.in: Built
	* testsuite/lib/libffi-dg.exp: New file.
	* testsuite/config/default.exp: Likewise.
	* testsuite/libffi.call/call.exp: Likewise.
	* testsuite/libffi.call/ffitest.h: Likewise.
	* testsuite/libffi.call/closure_fn0.c: Likewise.
	* testsuite/libffi.call/closure_fn1.c: Likewise.
	* testsuite/libffi.call/closure_fn2.c: Likewise.
	* testsuite/libffi.call/closure_fn3.c: Likewise.
	* testsuite/libffi.call/cls_1_1byte.c: Likewise.
	* testsuite/libffi.call/cls_3_1byte.c: Likewise.
	* testsuite/libffi.call/cls_4_1byte.c: Likewise.
	* testsuite/libffi.call/cls_2byte.c: Likewise.
	* testsuite/libffi.call/cls_3byte1.c: Likewise.
	* testsuite/libffi.call/cls_3byte2.c: Likewise.
	* testsuite/libffi.call/cls_4byte.c: Likewise.
	* testsuite/libffi.call/cls_5byte.c: Likewise.
	* testsuite/libffi.call/cls_6byte.c: Likewise.
	* testsuite/libffi.call/cls_7byte.c: Likewise.
	* testsuite/libffi.call/cls_8byte.c: Likewise.
	* testsuite/libffi.call/cls_12byte.c: Likewise.
	* testsuite/libffi.call/cls_16byte.c: Likewise.
	* testsuite/libffi.call/cls_20byte.c: Likewise.
	* testsuite/libffi.call/cls_24byte.c: Likewise.
	* testsuite/libffi.call/cls_double.c: Likewise.
	* testsuite/libffi.call/cls_float.c: Likewise.
	* testsuite/libffi.call/cls_uchar.c: Likewise.
	* testsuite/libffi.call/cls_uint.c: Likewise.
	* testsuite/libffi.call/cls_ulonglong.c: Likewise.
	* testsuite/libffi.call/cls_ushort.c: Likewise.
	* testsuite/libffi.call/float.c: Likewise.
	* testsuite/libffi.call/float1.c: Likewise.
	* testsuite/libffi.call/float2.c: Likewise.
	* testsuite/libffi.call/many.c: Likewise.
	* testsuite/libffi.call/many_win32.c: Likewise.
	* testsuite/libffi.call/nested_struct.c: Likewise.
	* testsuite/libffi.call/nested_struct1.c: Likewise.
	* testsuite/libffi.call/pyobjc-tc.c: Likewise.
	* testsuite/libffi.call/problem1.c: Likewise.
	* testsuite/libffi.call/promotion.c: Likewise.
	* testsuite/libffi.call/return_ll.c: Likewise.
	* testsuite/libffi.call/return_sc.c: Likewise.
	* testsuite/libffi.call/return_uc.c: Likewise.
	* testsuite/libffi.call/strlen.c: Likewise.
	* testsuite/libffi.call/strlen_win32.c: Likewise.
	* testsuite/libffi.call/struct1.c: Likewise.
	* testsuite/libffi.call/struct2.c: Likewise.
	* testsuite/libffi.call/struct3.c: Likewise.
	* testsuite/libffi.call/struct4.c: Likewise.
	* testsuite/libffi.call/struct5.c: Likewise.
	* testsuite/libffi.call/struct6.c: Likewise.
	* testsuite/libffi.call/struct7.c: Likewise.
	* testsuite/libffi.call/struct8.c: Likewise.
	* testsuite/libffi.call/struct9.c: Likewise.
	* testsuite/libffi.special/special.exp: New file.
	* testsuite/libffi.special/ffitestcxx.h: Likewise.
	* testsuite/libffi.special/unwindtest.cc: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libffi/ChangeLog.diff?cvsroot=gcc&r1=1.115&r2=1.116
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libffi/Makefile.am.diff?cvsroot=gcc&r1=1.27&r2=1.28
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libffi/Makefile.in.diff?cvsroot=gcc&r1=1.32&r2=1.33
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libffi/configure.in.diff?cvsroot=gcc&r1=1.43&r2=1.44
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libffi/configure.diff?cvsroot=gcc&r1=1.49&r2=1.50

Comment 5 Andreas Tobler 2003-09-04 15:04:25 UTC
I commited a dejagnu framework for libffi. Please test and give me feedback.
I then will close this bug, ok?
Comment 6 Rainer Orth 2003-09-04 18:43:52 UTC
Subject: Re:  libffi testing problems

Given the current breakage on mainline (apart from Solaris 9/Intel, none of
my platforms currently bootstraps) and the fact that I'll be on vacation
next week, this will have to wait until I return.

Thanks alot for your work.

	Rainer

Comment 7 Andreas Tobler 2003-09-23 04:12:05 UTC
I close this bug since I think the initial complaint is now no longer true. And
I integrated a dejagnu like testsuite. To fix the different failures is not part
of this bug I think. :)
Comment 8 Rainer Orth 2003-09-23 15:39:52 UTC
Subject: Re:  libffi testing problems

Excellent, thanks a lot for all your work (and congrats on the
maintainership :-).  I didn't expect you to fix libffi bugs exposed by your
work (which otherwise might have gone unnoticed for much longer).  I have
already filed sepearate reports for issues found while using the older
ffitest.c, and may well file more when I encounter new problems on other
platforms.

	Rainer