diff mbox

Fix tst-timezone race (bug 14096)

Message ID alpine.DEB.2.20.1706071607050.15341@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph Myers June 7, 2017, 4:07 p.m. UTC
I observed a failure of timezone/tst-timezone with the same symptoms
as reported in bug 14096.

I was unable to reproduce the failure on testing again.  However, from
inspection, the cause is as follows.  tst-timezone uses time zones
compiled from the northamerica file, but has no dependency on any such
zones, so with a parallel build it is possible that they do not get
compiled until after tst-timezone is run.  This patch adds a
dependency on the compiled America/New_York zone (the one used as a
makefile target to cause such zones to be compiled, rather than one
which is actually used in that test) to fix the race.

Tested for x86_64.

2017-06-07  Joseph Myers  <joseph@codesourcery.com>

	[BZ #14096]
	* timezone/Makefile ($(objpfx)tst-timezone.out): Depend on
	America/New_York.

Comments

H.J. Lu June 7, 2017, 4:39 p.m. UTC | #1
On Wed, Jun 7, 2017 at 9:07 AM, Joseph Myers <joseph@codesourcery.com> wrote:
> I observed a failure of timezone/tst-timezone with the same symptoms
> as reported in bug 14096.
>
> I was unable to reproduce the failure on testing again.  However, from
> inspection, the cause is as follows.  tst-timezone uses time zones
> compiled from the northamerica file, but has no dependency on any such
> zones, so with a parallel build it is possible that they do not get
> compiled until after tst-timezone is run.  This patch adds a
> dependency on the compiled America/New_York zone (the one used as a
> makefile target to cause such zones to be compiled, rather than one
> which is actually used in that test) to fix the race.
>
> Tested for x86_64.
>
> 2017-06-07  Joseph Myers  <joseph@codesourcery.com>
>
>         [BZ #14096]
>         * timezone/Makefile ($(objpfx)tst-timezone.out): Depend on
>         America/New_York.
>
> diff --git a/timezone/Makefile b/timezone/Makefile
> index ab9d55b..35e6a95 100644
> --- a/timezone/Makefile
> +++ b/timezone/Makefile
> @@ -79,6 +79,7 @@ $(objpfx)test-tz.out: $(addprefix $(testdata)/, America/New_York Etc/UTC UTC)
>  $(objpfx)tst-timezone.out: $(addprefix $(testdata)/, \
>                                        Europe/Berlin Universal \
>                                        Australia/Melbourne \
> +                                      America/New_York \
>                                        America/Sao_Paulo Asia/Tokyo \
>                                        Europe/London)
>  $(objpfx)tst-tzset.out: $(addprefix $(testdata)/XT, 1 2 3 4)
>

LGTM.

Thanks.
Paul Eggert June 7, 2017, 5:51 p.m. UTC | #2
Thanks for fixing that.
diff mbox

Patch

diff --git a/timezone/Makefile b/timezone/Makefile
index ab9d55b..35e6a95 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -79,6 +79,7 @@  $(objpfx)test-tz.out: $(addprefix $(testdata)/, America/New_York Etc/UTC UTC)
 $(objpfx)tst-timezone.out: $(addprefix $(testdata)/, \
 				       Europe/Berlin Universal \
 				       Australia/Melbourne \
+				       America/New_York \
 				       America/Sao_Paulo Asia/Tokyo \
 				       Europe/London)
 $(objpfx)tst-tzset.out: $(addprefix $(testdata)/XT, 1 2 3 4)