[v2] Make tst-strftime2 depend on locale generation
diff mbox series

Message ID 20191008174305.7763748d@tereshkova
State New
Headers show
Series
  • [v2] Make tst-strftime2 depend on locale generation
Related show

Commit Message

Gabriel F. T. Gomes Oct. 8, 2019, 8:43 p.m. UTC
On Tue, 08 Oct 2019, Florian Weimer wrote:
>
>Doesn't tst-strftime3 have the same problem?  Looks good otherwise.

On Tue, 08 Oct 2019, Tulio Magno Quites Machado Filho wrote:
>
>Likewise for tst-strftime3.out ?
>I've never seen an error there, but the test does depend on locales too.

Yes, you are right.  I haven't noticed a problem because these test may
get the locale from the system and the locale from the system I'm testing
on was good/new enough for tst-strftime3 (but not for tst-strftime2).

With the system locales deleted/inaccessible, both tests may fail before
v1 of this patch.  The following version solves the problem for both
tst-strftime2 and tst-strftime3, as well as it adds a ChangeLog entry.

Is the following patch OK for master?

From 083391d58262b045f39c59253dfb3f60e80a4531 Mon Sep 17 00:00:00 2001
From: "Gabriel F. T. Gomes" <gabrielftg@linux.ibm.com>
Date: Tue, 8 Oct 2019 14:32:17 -0300
Subject: [PATCH v2] Make tst-strftime2 and tst-strftime3 depend on locale
 generation

Building the test cases in parallel might make tst-strftime2 and
tst-strftime3 fail.  Simply re-running the test case (or building
serially) makes the problem go away.  This patch adds the necessary
dependency to allow parallel builds in the time subdirectory.

Tested for powerpc64le.

	* Makefile: Fix locale dependency for a couple of tests.
	($(objpfx)tst-strftime2.out): New rule.
	($(objpfx)tst-strftime3.out): Likewise.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
---
 time/Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Florian Weimer Oct. 8, 2019, 8:44 p.m. UTC | #1
* Gabriel F. T. Gomes:

> Is the following patch OK for master?

> diff --git a/time/Makefile b/time/Makefile
> index b9217992a6..ad8844ea34 100644
> --- a/time/Makefile
> +++ b/time/Makefile
> @@ -61,6 +61,8 @@ include ../gen-locales.mk
>  
>  $(objpfx)tst-ftime_l.out: $(gen-locales)
>  $(objpfx)tst-strptime.out: $(gen-locales)
> +$(objpfx)tst-strftime2.out: $(gen-locales)
> +$(objpfx)tst-strftime3.out: $(gen-locales)
>  endif
>  
>  tz-cflags = -DTZDIR='"$(zonedir)"' \

Yes, this looks good.  Please commit.

Patch
diff mbox series

diff --git a/time/Makefile b/time/Makefile
index b9217992a6..ad8844ea34 100644
--- a/time/Makefile
+++ b/time/Makefile
@@ -61,6 +61,8 @@  include ../gen-locales.mk
 
 $(objpfx)tst-ftime_l.out: $(gen-locales)
 $(objpfx)tst-strptime.out: $(gen-locales)
+$(objpfx)tst-strftime2.out: $(gen-locales)
+$(objpfx)tst-strftime3.out: $(gen-locales)
 endif
 
 tz-cflags = -DTZDIR='"$(zonedir)"' \