Commit Graph
186 Commits
Author SHA1 Message Date
Anthony Green 1d6059446f Add missing dist files. 2019-10-24 05:25:11 -04:00
Anthony Green 825b2a3594 Test on arm32v7-linux-gnu, ppc64le-linux-gnu and aarch64-linux-gnu.
Use docker images and qemu to test libffi for non-x86 architectures on
travis-ci.
Use the LIBFFI_TEST_OPTIMIZATION environment variable to
force specific optimization levels at test time.
2019-10-16 16:05:46 -04:00
pichikaudaykiran 09f9d85611 Making the change to correct the comment when SUN (#521)
and GCC are used together
2019-10-09 06:56:06 -04:00
Anthony Green 042ef8c314 Remove -Os testing. No ABI impact, and helps trim log lengths. 2019-02-12 08:52:18 -05:00
Anthony Green 8206253fdf Mark some cases as xfail due to GCC bug 2018-05-09 10:50:46 -04:00
hjl-tools d3c54cf3a2 Re-enable msabi testing (#436)
* Revert "disable msabi testing for now"

This reverts commit 7b7638eb0e.

* x86: Correct testing for 64-bit x86-64

Since passing -m32 to x86-64 compiler will generate i386 code, we
need to check both __ILP32__ and __i386__ for 64-bit x86-64.

* x86: Check __i386__ instead of i?86-*-* targets

Since passing -m32 to x86-64 compiler will generate i386 code, we need
to check __i386__ instead of i?86-*-* targets for i386 targets.

* i386: Properly passing integer parameters in registers

For thiscall and fastcall, if the paramter passed as 64-bit integer or
struct, all following integer paramters will be passed on stack.

* test: Add ABI_ATTR to callback_code

Add ABI_ATTR to callback_code to properly test different ABIs.
2018-05-02 09:19:58 -04:00
Andreas Krebbel 801c1bd712 Fix issue #421 (#422)
Fantastic - thanks for digging into this.
2018-04-05 07:27:32 -05:00
Anthony Green 7b7638eb0e disable msabi testing for now 2018-04-02 08:24:44 -04:00
fwg af6773d6ab Fix appveyor windows build (#420)
* Fix msvcc dll build by adding dllexport decorations to all API declarations

* Fix appveyor build for VS 2013

Use the new -DFFI_BUILDING_DLL for producing a working DLL. Update the
msvcc.sh wrapper script to successfully compile the testsuite files.

* MSVC build: suppress warnings in testsuite

* fix testsuite on appveyor
2018-04-02 06:55:31 -05:00
Anthony Green 48bdb02867 Trim some optimization tests 2018-03-29 07:22:57 -04:00
Anthony Green fa72b054e1 Remove warning message from clang 2018-03-29 07:10:23 -04:00
Anthony Green 746c3ce220 Expand ABI tests on x86. Testsuite bug fixes. 2018-03-29 07:01:14 -04:00
Anthony Green e8cf133813 msvc c99 hack 2018-03-27 14:12:02 -04:00
Anthony Green a3e2094089 More msvc hacks 2018-03-27 11:58:42 -04:00
Anthony Green a82b456e98 msvc fixes 2018-03-27 11:49:46 -04:00
Anthony Green 85b6b209d7 Force literals to float (msvc warning) 2018-03-27 11:35:23 -04:00
Anthony Green 5c2ca479e7 Remove uninitialized warning. Fix #163. 2018-03-27 04:01:37 -04:00
Anthony Green 247e44b3ef Fix return values 2018-03-18 07:01:54 -04:00
Anthony Green 1f99701fad Make tests compile/run standalone 2018-03-17 22:49:58 -04:00
Anthony Green a33bfa9b12 xfail unwind tests for moxie 2018-03-17 07:17:24 -04:00
Anthony Green d2f7e788ae Fix test cases with short results 2018-03-14 09:06:38 -04:00
Anthony Green 16313cb274 Support compiler specific warning suppression flags 2018-03-13 08:52:30 -04:00
Anthony Green cca6d1fb54 Support compiler specific warning suppression flags 2018-03-13 08:51:34 -04:00
Anthony Green 9291f941c2 Add bhaible's missing Makefile 2018-03-13 08:37:21 -04:00
Anthony Green bede01d82e Remove stray directory 2018-03-13 07:53:33 -04:00
Anthony Green ddf7a8f751 Update test list for dist 2018-03-13 07:47:57 -04:00
Anthony Green 6186261cb3 Add Bruno Haible and Bill Triggs' libffi testsuite 2018-03-12 21:53:18 -04:00
Sergei Trofimovich 45da2fcbcd new test: return small struct
The bug originally was discovered in https://bugs.gentoo.org/634190
where complicated callback was returning invalid data on ia64.

This change adds minimal reproducer that fails only on ia64 as:

FAIL: libffi.call/struct10.c -W -Wall -Wno-psabi -O0 execution test
FAIL: libffi.call/struct10.c -W -Wall -Wno-psabi -O2 execution test
FAIL: libffi.call/struct10.c -W -Wall -Wno-psabi -O3 execution test
FAIL: libffi.call/struct10.c -W -Wall -Wno-psabi -Os execution test

Test passes on amd64. The fix is in the following commit.

Bug: https://bugs.gentoo.org/634190
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2018-02-17 18:53:02 +00:00
Saleem Abdulrasool 1fb788ac89 aarch64: fix index base register for AArch64
The base is passed in `x3`, not in `x2`.  This fixes the indexing base
so that the right value is used.
2017-10-26 19:13:10 -07:00
H.J. Lu b2a343ffc6 Don't include WIN64/EFI64 for x32
Since x32 doesn't support WIN64/EFI64, don't include it for x32.  Also
x32 has sizeof size_t == 4.  But TARGET should be X86_64.
2017-10-25 05:36:49 -07:00
Anthony Green c9c2aa2461 Revert previous two changes. clang/MacOS problem can only be solved within dejagnu. 2017-03-15 09:58:39 -04:00
Anthony Green 5a8fca9405 Fix typo 2017-03-15 09:52:39 -04:00
Anthony Green 5b10a01981 Work around dejagnu/clang problems 2017-03-15 09:34:01 -04:00
Anthony Green c5b408ee78 xfail the unwindtest for osx as per issue #279 2016-09-04 09:17:46 -04:00
Yuriy Kolerov ef8be84de5 Do not use fabsl() in float2.c test
Some targets may support long double variables but in the same
time may lack support of long double functions like fabsl().

Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
2016-07-29 21:05:22 +03:00
Yuriy Kolerov f3201733d5 Fix output expectations in cls_dbls_struct.c test
This test with invalid output expectations may fail on some targets
(e.g. ARC processors).

Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
2016-07-29 19:18:41 +03:00
Yuriy Kolerov f74ea2dc79 Allow setting an arbitary value for blddirffi in testsuite
It is useful when tests are executed not from build directory. So
the path of the build directory may be passed through site.exp or
runtest.

Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
2016-07-28 21:34:06 +03:00
Yuriy Kolerov 31362d785e ARC: Link tests with pthread library
Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
2016-07-28 18:48:23 +03:00
Tom Tromey 02089a1b5c Merge pull request #237 from tschwinge/libffi_feature_test
Simplify/fix libffi_feature_test
2016-05-23 09:58:51 -06:00
Richard Henderson e5843a3a09 x86: Fix calling convention for ffi_closure_win64_inner
Also enable testing for the cross-abi calls.
2016-04-29 14:17:36 -07:00
Thomas Schwinge c884551781 Simplify/fix libffi_feature_test
As detailed in
<http://news.gmane.org/find-root.php?message_id=%3C87wppswqqt.fsf%40kepler.schwinge.homeip.net%3E>,
the original code (originally added in commit
f1301a54bb as part of pull request #145) does not
work (at least not for me, in the GCC environment).
2016-03-16 17:37:07 +01:00
Tom Tromey 38a4d72c95 add ffi_get_struct_offsets 2016-02-22 16:07:55 -07:00
Anthony Green 755f1e642d Merge pull request #193 from rth7680/fix-70
Test case from issue #70
2016-02-20 06:43:48 -05:00
Filipe Brandenburger 89b760503e Fix dejagnu test support for --tool_opts
Right now it concatenates it with the existing options and then appends
it to that list, fix it to simply append it as is, same as it is done
with the other variables.

Tested by running the following command which includes gcc options:
  $ make check RUNTESTFLAGS="--tool_opts '-Werror'"

Without this patch, all the tests fail. With it, the test succeed.
Inspecting the logs shows that -Werror was indeed used when compiling
the test sources.
2016-02-03 13:37:39 -08:00
Richard Henderson 4cdedc279f Tidy call.exp test collection
Commit c952a92e20 moved all of
the complex tests to libffi.complex, but failed to remove the
anti-globbing from libffi.call.
2015-10-20 07:16:10 -10:00
Richard Henderson 609db2fbe4 Test case from Issue #70 2015-10-20 07:16:10 -10:00
Anthony Green 5cd411ad5d New test case for old aarch64 bug 2015-01-13 15:44:03 -05:00
Richard Henderson ccdd7bb856 testsuite: Fix alpha static chain register name 2014-11-16 12:12:23 +01:00
Anthony Green 3316b666e3 Merge pull request #145 from rth7680/master
Configure and testsuite cleanups, v2
2014-11-15 07:31:41 -05:00
Richard Henderson c9f5b6648b testsuite: Add trivial tests for Go closures 2014-11-14 13:07:47 +01:00