From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114230 invoked by alias); 28 Oct 2016 18:07:42 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 114196 invoked by uid 89); 28 Oct 2016 18:07:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=expectations, listing, our X-HELO: relay1.mentorg.com Date: Fri, 28 Oct 2016 18:07:00 -0000 From: Joseph Myers To: Adhemerval Zanella CC: Subject: Re: [PATCH] crypt: Use internal names for the SHA-2 block functions In-Reply-To: <49a0f49e-b22c-2dd1-fa5b-bbad89e8aacb@linaro.org> Message-ID: References: <49a0f49e-b22c-2dd1-fa5b-bbad89e8aacb@linaro.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2016-10/txt/msg00559.txt.bz2 On Fri, 28 Oct 2016, Adhemerval Zanella wrote: > > It's true that linknamespace considerations apply even for _DEFAULT_SOURCE > > and _GNU_SOURCE - using a function declared under one of those conditions > > should not bring in a reference to a function not so declared. The > > difficulty in testing this is that it really needs a list of all installed > > headers to be visible in one place (and there's the question of whether we > > consider _DEFAULT_SOURCE to include all headers or not). > > Right, but how hard would to add a rule in conform to tests for glibc specific > headers (conformtest-headers-GLIBC or conformtest-headers-GNU) and at > first add the crypt.h plus _GNU_SOURCE? You'd need the set of headers for linknamespace tests to be bigger than the set for conformtest tests (which makes sense anyway - there are several standard variants without conformtest expectations, setting up such expectations is a lot of work, but listing headers in a standard is easy and listing headers plus specifying compilation options is all that's needed for linknamespace tests). But you'd have to hope that the set of headers you specify for _GNU_SOURCE is internally consistent. It's perfectly valid under our namespace rules for a function to call a function in some Linux-specific header, for example (and the Linux-specific headers can't be listed in conform/Makefile, only sysdeps/unix/sysv/linux/Makefile knows about them). I wonder about arranging the makefiles so they record each subdirectory's list of installed headers as part of the build, the toplevel collects that information together, so when the testsuite runs such a list is available. Running tests in each subdirectory works for e.g. Zack's tests, where testing for each header is independent, but not for things that need to see a complete list of all installed headers at once. That way, conform/ could access that list saved during the build, and filter out bits/ headers (and any other headers that just give errors, like Zack's tests filter out some such headers) to get a list of headers for GNU / DEFAULT linknamespace tests. -- Joseph S. Myers joseph@codesourcery.com