S/390: xfail test POSIX/signal.h
diff mbox

Message ID lfuu4d$uam$2@ger.gmane.org
State New
Headers show

Commit Message

Stefan Liebler March 14, 2014, 12:53 p.m. UTC
Hi,

on S390x the conformance test conform/POSIX/signal.h/conform.out is 
failing, due to incorrect type.
The member sa_flags in struct sigaction on s390x is defined
as unsigned long instead of int due to the kernel struct.
On other platforms, sa_flags is also unsigned long: ia64, sparc, hppa.

Bye

---
2014-03-14  Stefan Liebler  <stli@linux.vnet.ibm.com>

	* sysdeps/s390/s390-64/Makefile
	(test-xfail-POSIX/signal.h/conform): New Variable.
---

Comments

Joseph Myers March 14, 2014, 2:30 p.m. UTC | #1
On Fri, 14 Mar 2014, Stefan Liebler wrote:

> Hi,
> 
> on S390x the conformance test conform/POSIX/signal.h/conform.out is failing,
> due to incorrect type.
> The member sa_flags in struct sigaction on s390x is defined
> as unsigned long instead of int due to the kernel struct.
> On other platforms, sa_flags is also unsigned long: ia64, sparc, hppa.

If you need to XFAIL such a test on an architecture-specific basis, the 
XFAIL should have a comment explaining why the test is expected to fail.

However, in this case I don't see the need to XFAIL it.  As far as I can 
tell, the upper bits of sa_flags aren't actually assigned.  So you should 
be able to change the structure so that sa_flags is int, with an adjacent 
padding field.  This would mean random padding is passed to the kernel in 
what the kernel thinks is the high part of the field, so you should either 
get kernel agreement that this is OK, or make glibc's sigaction 
implementation copy the structure and zero the padding.

(Again, file a bug in glibc Bugzilla before fixing it.)

Patch
diff mbox

diff --git a/sysdeps/s390/s390-64/Makefile b/sysdeps/s390/s390-64/Makefile
index 37f021c..66c159e 100644
--- a/sysdeps/s390/s390-64/Makefile
+++ b/sysdeps/s390/s390-64/Makefile
@@ -10,6 +10,10 @@  CFLAGS-dl-load.c += -Wno-unused
 CFLAGS-dl-reloc.c += -Wno-unused
 endif
 
+ifeq ($(subdir),conform)
+test-xfail-POSIX/signal.h/conform = yes
+endif
+
 ifeq ($(subdir),iconvdata)
 ISO-8859-1_CP037_Z900-routines := iso-8859-1_cp037_z900
 ISO-8859-1_CP037_Z900-map := gconv.map