From patchwork Wed Dec 21 13:36:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 88735 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp2272840qgi; Wed, 21 Dec 2016 05:37:00 -0800 (PST) X-Received: by 10.99.209.5 with SMTP id k5mr7763318pgg.145.1482327420475; Wed, 21 Dec 2016 05:37:00 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id r17si26694348pgh.174.2016.12.21.05.37.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Dec 2016 05:37:00 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-76176-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-76176-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-76176-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; q=dns; s=default; b=SVql hiVlwuDGBgkp+LdkFVB4cx324C6be6JCs7EA3DzpZOQEXiS5tHoQAsfTN4LziYe/ 9EvsJdpGPUvCCvxzBLBzJ5bcfbypaslHldZCBloM1mXge7pA7ySjYOg94yJoFSqZ 9xqTig/KDf6USYG/ZihdFAltJDCxS4cVOKlbezM= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; s=default; bh=GNYFWKzWs1 zLLQtJekQmU4NIUFg=; b=whS0I0X8d58ZN8jL8M5cXvtZUQDOQFme8zJgJAK7+/ TvJWD+fXFhAWVbcTW/SOmZhm8o9n05Tk5ia5aqNsSRqSQP8GTX3ivHGoNb5o2Nfh DypmAmWU3iKeRPazKbD5Z5NmPchB41NXuOXVtUPkhHiQ/PgONZRAXrOOxoAQfrxb c= Received: (qmail 113120 invoked by alias); 21 Dec 2016 13:36:50 -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 113051 invoked by uid 89); 21 Dec 2016 13:36:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=impose, 2016-12-21 X-HELO: mx1.redhat.com Subject: Re: [PATCH 13/15] Move all tests out of csu. To: Nix , libc-alpha@sourceware.org References: <20161219111528.14969-1-nix@esperi.org.uk> <20161219111528.14969-14-nix@esperi.org.uk> From: Florian Weimer Message-ID: Date: Wed, 21 Dec 2016 14:36:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161219111528.14969-14-nix@esperi.org.uk> On 12/19/2016 12:15 PM, Nix wrote: > From: Nick Alcock > > Stack-protection on .o files in csu/ must be suppressed for the sake of > library startup code. This also suppresses stack-protection in tests > (which are also covered by CFLAGS-.o), though this is neither necessary > nor desirable. > > So impose the rule that .o files in csu/ are necessarily C startup code, > and move the few tests in there into misc/ instead. > > v10: New. > > * csu/Makefile (tests): Move this... > (tests-static): ... and this... > * misc/Makefile (tests): ... to here... > (tests-static): ... and here. > * csu/tst-empty.c: Move to... > * misc/tst-empty.c: ... here. > * csu/tst-atomic.c: Move to... > * misc/tst-atomic.c: ... here. > * csu/tst-atomic-long.c: Move to... > * misc/tst-atomic-long.c: ... here. I committed this variant of the patch. Thanks, Florian Move all tests out of the csu subdirectory Stack-protection on .o files in csu/ must be suppressed for the sake of library startup code. This also suppresses stack-protection in tests (which are also covered by CFLAGS-.o), though this is neither necessary nor desirable. So impose the rule that .o files in csu/ are necessarily C startup code, and move the few tests in there into misc/ instead. 2016-12-21 Nick Alcock Florian Weimer [BZ #7065] * csu/Makefile (tests): Empty assignment and document it. (tests-static): Remove. * csu/tst-empty.c: Move to... * misc/tst-empty.c: ... here. Switch to new test driver. * csu/tst-atomic.c: Move to... * misc/tst-atomic.c: ... here. Switch to new test driver. * csu/tst-atomic-long.c: Move to... * misc/tst-atomic-long.c: ... here. * misc/Makefile (tests): Add tst-empty, tst-atomic, tst-atomic-long. (tests-static): Add tst-empty. diff --git a/csu/Makefile b/csu/Makefile index 31e8bb9..3d23f13 100644 --- a/csu/Makefile +++ b/csu/Makefile @@ -42,8 +42,9 @@ install-lib = $(start-installed-name) g$(start-installed-name) $(csu-dummies) generated += version-info.h before-compile += $(objpfx)version-info.h -tests := tst-empty tst-atomic tst-atomic-long -tests-static := tst-empty +# No tests are allowed in the csu/ subdirectory because the startup +# code is compiled with special flags. +tests = ifeq (yes,$(build-shared)) extra-objs += S$(start-installed-name) gmon-start.os diff --git a/misc/Makefile b/misc/Makefile index 3d2ebb8..d241dae 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -79,7 +79,10 @@ gpl2lgpl := error.c error.h tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \ tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 \ tst-mntent-blank-corrupt tst-mntent-blank-passno bug18240 \ - tst-preadvwritev tst-preadvwritev64 tst-makedev + tst-preadvwritev tst-preadvwritev64 tst-makedev tst-empty \ + tst-atomic tst-atomic-long +tests-static := tst-empty + ifeq ($(run-built-tests),yes) tests-special += $(objpfx)tst-error1-mem.out endif diff --git a/csu/tst-atomic-long.c b/misc/tst-atomic-long.c similarity index 100% rename from csu/tst-atomic-long.c rename to misc/tst-atomic-long.c diff --git a/csu/tst-atomic.c b/misc/tst-atomic.c diff --git a/csu/tst-atomic.c b/misc/tst-atomic.c similarity index 99% rename from csu/tst-atomic.c rename to misc/tst-atomic.c +++ b/misc/tst-atomic.c @@ -636,5 +636,4 @@ do_test (void) return ret; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/csu/tst-empty.c b/misc/tst-empty.c similarity index 58% rename from csu/tst-empty.c rename to misc/tst-empty.c +++ b/misc/tst-empty.c @@ -5,5 +5,4 @@ do_test (void) return 0; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include