diff options
author | Thorsten Glaser <tg@mirbsd.de> | 2012-12-03 00:02:31 +0000 |
---|---|---|
committer | Anthony Green <green@moxielogic.com> | 2013-01-07 06:22:51 -0500 |
commit | 0de3277b18cf54be3b81d509b9be9b47d9bc1e82 (patch) | |
tree | 9d8e65a014aa9f9215925dc680e089fd00d03b38 /testsuite | |
parent | 8f4772f383abd71cfa141c8a70ba11c1aa4ebe2c (diff) | |
download | libffi-0de3277b18cf54be3b81d509b9be9b47d9bc1e82.tar.gz |
Testsuite fixes (was Re: [PATCH] Fix libffi on m68k-linux-gnu, completely)
Dixi quod…
>although I believe some 3.0.11 checks to be broken:
And indeed, with a few minor changes on top of git master,
I still get a full run of PASS plus one XPASS on amd64-linux!
With the other patches (from this message’s parent) and
these applied, I get a full PASS on m68k-linux as well.
So, please git am these three diffs ☺
bye,
//mirabilos
--
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh
From 5cb15a3bad1f0fb360520dd48bfc938c821cdcca Mon Sep 17 00:00:00 2001
From: Thorsten Glaser <tg@mirbsd.org>
Date: Sun, 2 Dec 2012 23:20:56 +0000
Subject: [PATCH 1/2] Fix tests writing to a closure retval via pointer casts
As explained in <Pine.BSM.4.64L.1212022014490.23442@herc.mirbsd.org>
all other tests that do the same cast to an ffi_arg pointer instead.
PASS on amd64-linux (Xen domU) and m68k-linux (ARAnyM)
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/libffi.call/cls_uchar_va.c | 4 | ||||
-rw-r--r-- | testsuite/libffi.call/cls_ushort_va.c | 4 | ||||
-rw-r--r-- | testsuite/libffi.call/va_1.c | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/testsuite/libffi.call/cls_uchar_va.c b/testsuite/libffi.call/cls_uchar_va.c index 19cd4f3..6491c5b 100644 --- a/testsuite/libffi.call/cls_uchar_va.c +++ b/testsuite/libffi.call/cls_uchar_va.c @@ -12,9 +12,9 @@ typedef unsigned char T; static void cls_ret_T_fn(ffi_cif* cif __UNUSED__, void* resp, void** args, void* userdata __UNUSED__) { - *(T *)resp = *(T *)args[0]; + *(ffi_arg *)resp = *(T *)args[0]; - printf("%d: %d %d\n", *(T *)resp, *(T *)args[0], *(T *)args[1]); + printf("%d: %d %d\n", (int)(*(ffi_arg *)resp), *(T *)args[0], *(T *)args[1]); } typedef T (*cls_ret_T)(T, ...); diff --git a/testsuite/libffi.call/cls_ushort_va.c b/testsuite/libffi.call/cls_ushort_va.c index b2b5a3b..37aa106 100644 --- a/testsuite/libffi.call/cls_ushort_va.c +++ b/testsuite/libffi.call/cls_ushort_va.c @@ -12,9 +12,9 @@ typedef unsigned short T; static void cls_ret_T_fn(ffi_cif* cif __UNUSED__, void* resp, void** args, void* userdata __UNUSED__) { - *(T *)resp = *(T *)args[0]; + *(ffi_arg *)resp = *(T *)args[0]; - printf("%d: %d %d\n", *(T *)resp, *(T *)args[0], *(T *)args[1]); + printf("%d: %d %d\n", (int)(*(ffi_arg *)resp), *(T *)args[0], *(T *)args[1]); } typedef T (*cls_ret_T)(T, ...); diff --git a/testsuite/libffi.call/va_1.c b/testsuite/libffi.call/va_1.c index 5c7cce9..cf4dd85 100644 --- a/testsuite/libffi.call/va_1.c +++ b/testsuite/libffi.call/va_1.c @@ -5,7 +5,7 @@ Originator: ARM Ltd. */ /* { dg-do run } */ -/* { dg-output "" { xfail avr32*-*-* x86_64-*-*-* } } */ +/* { dg-output "" { xfail avr32*-*-* } } */ #include "ffitest.h" #include <stdarg.h> @@ -132,10 +132,10 @@ main (void) arg_types[1] = &s_type; arg_types[2] = &l_type; arg_types[3] = &s_type; - arg_types[4] = &ffi_type_uint; - arg_types[5] = &ffi_type_sint; - arg_types[6] = &ffi_type_uint; - arg_types[7] = &ffi_type_sint; + arg_types[4] = &ffi_type_uchar; + arg_types[5] = &ffi_type_schar; + arg_types[6] = &ffi_type_ushort; + arg_types[7] = &ffi_type_sshort; arg_types[8] = &ffi_type_uint; arg_types[9] = &ffi_type_sint; arg_types[10] = &ffi_type_ulong; |