From patchwork Mon Sep 28 23:01:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sebor X-Patchwork-Id: 8877 Received: (qmail 124497 invoked by alias); 28 Sep 2015 23:01:46 -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 124486 invoked by uid 89); 28 Sep 2015 23:01:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qk0-f180.google.com X-Received: by 10.55.16.73 with SMTP id a70mr5658704qkh.95.1443481301996; Mon, 28 Sep 2015 16:01:41 -0700 (PDT) Message-ID: <5609C6D2.7010104@gmail.com> Date: Mon, 28 Sep 2015 17:01:38 -0600 From: Martin Sebor User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: GNU C Library Subject: Re: [PATCH] 18969 - multiple string test failures due to missing locale dependencies References: <560471F5.9080800@gmail.com> <56094883.2020002@redhat.com> In-Reply-To: <56094883.2020002@redhat.com> After committing the patch I noticed a number of other similar problems in other Makefiles. I tried to find a complete set by grepping tests (files that match the tst*.c and test*.c shell pattern) for calls to setlocale with a named locale, testing a subset of those, and fixing the errors I got by making the same tweaks to the Makefile as in the first patch. It's possible I still missed some. Attached is a follow-on patch with these tweaks. Martin PS In the process of this testing I ran into another, unrelated problem. Some of the Makefiles add test output files to a variable named tests-special. When make is invoked to build and run just one or a few tests, the invocation fails with an error like the one below. The error can be avoided by adding the .out files to the variable only when the tests variable is defined in the Makefile rather than on the command line. I haven't included these fixes in this patch since it's an unrelated problem. Instead, unless there are objections, I will post another patch later to correct this problem. make[2]: *** No rule to make target `/build/glibc-trunk/power8/stdio-common/tst-printf-bz18872.out', needed by `/build/glibc-trunk/power8/stdio-common/tst-printf-bz18872-mem.out'. Stop. 2015-09-28 Martin Sebor [BZ #18969] * stdlib/Makefile: Include gen-locales.mk. (test-isomac.out, testmb2.out, tst-strtod.out, tst-strtod3.out) (tst-strtod4.out, tst-strtod5.out): Add dependency on $(gen-locales). * time/Makefile: Include gen-locales.mk. (tst-ftime_l.out, tst-stptime.out): Add dependency on $(gen-locales). * wcsmbs/Makefile: Include gen-locales.mk. (tst-btowc.out, tst-c16c32-1.out, tst-mbrtowc.out,tst-mbrtowc2.out): (tst-wcrtomb.out): Add dependency on $(gen-locales). diff --git a/stdlib/Makefile b/stdlib/Makefile index 402466a..319d084 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -116,6 +116,18 @@ CFLAGS-tst-makecontext2.c = $(stack-align-test-flags) tests-special += $(objpfx)isomac.out ifeq ($(run-built-tests),yes) + +LOCALES := cs_CZ.UTF-8 de_DE.UTF-8 en_US.ISO-8859-1 \ + tr_TR.ISO-8859-9 tr_TR.UTF-8 +include ../gen-locales.mk + +$(objpfx)test-isomac.out: $(gen-locales) +$(objpfx)testmb2.out: $(gen-locales) +$(objpfx)tst-strtod.out: $(gen-locales) +$(objpfx)tst-strtod3.out: $(gen-locales) +$(objpfx)tst-strtod4.out: $(gen-locales) +$(objpfx)tst-strtod5.out: $(gen-locales) + tests-special += $(objpfx)tst-fmtmsg.out endif diff --git a/time/Makefile b/time/Makefile index a411f62..6ae42cc 100644 --- a/time/Makefile +++ b/time/Makefile @@ -41,6 +41,15 @@ tests := test_time clocktest tst-posixtz tst-strptime tst_wcsftime \ include ../Rules +ifeq ($(run-built-tests),yes) + +LOCALES := de_DE.ISO-8859-1 +include ../gen-locales.mk + +$(objpfx)tst-ftime_l.out: $(gen-locales) +$(objpfx)tst-stptime.out: $(gen-locales) +endif + tz-cflags = -DTZDIR='"$(zonedir)"' \ -DTZDEFAULT='"$(localtime-file)"' \ -DTZDEFRULES='"$(posixrules-file)"' diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile index dc72ba4..01fd8f1 100644 --- a/wcsmbs/Makefile +++ b/wcsmbs/Makefile @@ -51,6 +51,18 @@ tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \ include ../Rules +ifeq ($(run-built-tests),yes) + +LOCALES := de_DE.ISO-8859-1 de_DE.UTF-8 hr_HR.ISO-8859-2 ja_JP.EUC-JP +include ../gen-locales.mk + +$(objpfx)tst-btowc.out: $(gen-locales) +$(objpfx)tst-c16c32-1.out: $(gen-locales) +$(objpfx)tst-mbrtowc.out: $(gen-locales) +$(objpfx)tst-mbrtowc2.out: $(gen-locales) +$(objpfx)tst-wcrtomb.out: $(gen-locales) +endif + CFLAGS-wcwidth.c = -I../wctype CFLAGS-wcswidth.c = -I../wctype