This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] 18969 - multiple string test failures due to missing locale dependencies


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  <msebor@redhat.com>

	[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
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]