From patchwork Fri Mar 21 13:40:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Liebler X-Patchwork-Id: 205 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx23.g.dreamhost.com (caibbdcaabja.dreamhost.com [208.113.200.190]) by wilcox.dreamhost.com (Postfix) with ESMTP id 09B233600F8 for ; Fri, 21 Mar 2014 06:40:34 -0700 (PDT) Received: by homiemail-mx23.g.dreamhost.com (Postfix, from userid 14307373) id AC56362D3E017; Fri, 21 Mar 2014 06:40:34 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx23.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx23.g.dreamhost.com (Postfix) with ESMTPS id 8761162D3E012 for ; Fri, 21 Mar 2014 06:40:34 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=bsxB mhuyvTgMF5Ssnu+VVidwJ7RolGp0bwG8yzfQ0xGak6dmcGpQDDOMq5AcvY7jXkHK R8eUVMc7AK/e56xOyRul0DqKmUj+FM5MDCBJxLCxAFhm5X2ekFvBn/CznSRmO3c1 PvrvvStIqzIB4yZsLmD5Nzn8qmfMCE/iP0mA740= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=UQafigpYjQ YL4Tew3RxIkmj/ZQo=; b=u3WxXqBskr5xCkLHxOC9ciJG2oR6ifNioeqVZftG7a 91W9gF3gmBusRk5VfjscB6hcqFlLYkeyviFeyZWm5PIOB1eFg1UtH0HaDLPkae9e GYLV4Py5dx88ofIlgDvLy/2wlYVv0ftQ4TvvzFgvss9Mmor1P3bRTRsiMBZ80EVQ M= Received: (qmail 31690 invoked by alias); 21 Mar 2014 13:40:32 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 31680 invoked by uid 89); 21 Mar 2014 13:40:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: plane.gmane.org To: libc-alpha@sourceware.org From: Stefan Liebler Subject: Re: [PATCH] S/390: xfail test POSIX/signal.h Date: Fri, 21 Mar 2014 14:40:15 +0100 Lines: 72 Message-ID: References: Mime-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: X-DH-Original-To: glibc@patchwork.siddhesh.in On 03/14/2014 03:30 PM, Joseph S. Myers wrote: > 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.) > Hi, i talked to the kernel guys and the kernel has no problem with the padding variable and its random content. So i added the padding variable and changed sa_flags to int in order to be POSIX conform. Afterwards tested on S390/S390x. Is this okay? Bye --- 2014-03-21 Stefan Liebler [BZ #16713] * sysdeps/unix/sysv/linux/s390/bits/sigaction.h (__glibc_reserved0): New variable. (sa_flags): Change type to int. --- diff --git a/sysdeps/unix/sysv/linux/s390/bits/sigaction.h b/sysdeps/unix/sysv/linux/s390/bits/sigaction.h index f8baf84..b60b8f8 100644 --- a/sysdeps/unix/sysv/linux/s390/bits/sigaction.h +++ b/sysdeps/unix/sysv/linux/s390/bits/sigaction.h @@ -43,7 +43,8 @@ struct sigaction #endif /* Special flags. */ - unsigned long int sa_flags; + int __glibc_reserved0; + int sa_flags; /* Restore handler. */ void (*sa_restorer) (void);