Do not run timezone tests in parallel.
diff mbox

Message ID lijgrq$f8s$1@ger.gmane.org
State New
Headers show

Commit Message

Stefan Liebler April 15, 2014, 2:48 p.m. UTC
Hi,

running the testsuite with PARALLELMFLAGS="-j2"
leads to an UNRESOLVED test:
timezone/testdata/UTC.
-> The timezone/testdata/UTC.test-result file does not exist
and timezone/testdata/Etc/UTC.test-result exists.
According to the output of make, Etc/UTC is called directly before UTC
and both targets collide in parallel execution.
Thus we should not execute the timezone-tests in parallel.

Ok to commit?

Bye

---
2014-04-15  Stefan Liebler  <stli@linux.vnet.ibm.com>

	* timezone/Makefile: Do nothing in parallel.
---

Comments

Andreas Schwab April 15, 2014, 3:14 p.m. UTC | #1
Stefan Liebler <stli@linux.vnet.ibm.com> writes:

> @@ -102,7 +105,6 @@ $(testdata)/America/New_York: northamerica $(zic-deps)
>  	$(build-testdata)
>  $(testdata)/Etc/UTC: etcetera $(zic-deps)
>  	$(build-testdata)
> -# Use a pattern rule to indicate the command produces both targets at once.
>  # Two separate targets built separately can collide if in parallel.
>  %/UTC %/Universal: simplebackw $(zic-deps) %/Etc/UTC
>  	$(build-testdata)

Why is that comment no longer relevant?

Andreas.
Andreas Schwab April 16, 2014, 10:19 a.m. UTC | #2
Stefan Liebler <stli@linux.vnet.ibm.com> writes:

> According to the output of make, Etc/UTC is called directly before UTC
> and both targets collide in parallel execution.

In which way do they collide?

Andreas.
Stefan Liebler April 16, 2014, 3:21 p.m. UTC | #3
I´ve tested the different cases:
-(1) .NOTPARALLEL Makefile with -j2
-(2) original Makefile with -j2


The difference is, that in case (1) timezone/testdata/UTC.test-result is 
generated by the rule
%/UTC %/Universal: simplebackw $(zic-deps) %/Etc/UTC
	$(build-testdata)
and timezone/testdata/Universal.test-result does not exist.

In case (2) it is vice versa.
timezone/testdata/Universal.test-result exists,
but timezone/testdata/UTC.test-result does not, which leads to the 
unresolved test.
In case (1) it is no UNRESOLVED-test, because Universal is not added to 
test-special:
test-zones := America/New_York Etc/UTC UTC Europe/Berlin \
	      Australia/Melbourne America/Sao_Paulo Asia/Tokyo
tests-special += $(addprefix $(testdata)/, $(test-zones))


In the following i excerpted the relevant lines of make --debug=v output:
-(1) .NOTPARALLEL Makefile with -j2:
------------------------------------
 > timezone/testdata/America/New_York.test-result
 > timezone/testdata/Etc/UTC.test-result
     Must remake target `glibcNOTPARALLEL/timezone/testdata/UTC'.
Invoking recipe from Makefile:111 to update target 
`glibcNOTPARALLEL/timezone/testdata/UTC'.
 > timezone/testdata/UTC.test-result
 > timezone/test-tz.test-result
 > timezone/testdata/Europe/Berlin.test-result
     Successfully remade target file 
`glibcNOTPARALLEL/timezone/testdata/Europe/Berlin'.
     Considering target file `glibcNOTPARALLEL/timezone/testdata/Universal'.
     File `glibcNOTPARALLEL/timezone/testdata/Universal' was considered 
already.
     Considering target file 
`glibcNOTPARALLEL/timezone/testdata/Australia/Melbourne'.
      File `glibcNOTPARALLEL/timezone/testdata/Australia/Melbourne' does 
not exist.
 > timezone/testdata/Australia/Melbourne.test-result
 > timezone/testdata/America/Sao_Paulo.test-result
 > timezone/testdata/Asia/Tokyo.test-result
 > timezone/tst-timezone.test-result


-(2) original Makefile with -j2:
--------------------------------
 > timezone/testdata/America/New_York.test-result
 > timezone/testdata/Etc/UTC.test-result
     Recipe of `glibcJ2/timezone/testdata/Etc/UTC' is being run.
     Considering target file `glibcJ2/timezone/testdata/UTC'.
      File `glibcJ2/timezone/testdata/UTC' does not exist.
      Finished prerequisites of target file `glibcJ2/timezone/testdata/UTC'.
     The prerequisites of `glibcJ2/timezone/testdata/UTC' are being made.
    Finished prerequisites of target file `glibcJ2/timezone/test-tz.out'.
   The prerequisites of `glibcJ2/timezone/test-tz.out' are being made.
   Considering target file `glibcJ2/timezone/tst-timezone.out'.
    File `glibcJ2/timezone/tst-timezone.out' does not exist.
     Considering target file `glibcJ2/timezone/tst-timezone'.
     File `glibcJ2/timezone/tst-timezone' was considered already.
     Considering target file `glibcJ2/timezone/testdata/Europe/Berlin'.
      File `glibcJ2/timezone/testdata/Europe/Berlin' does not exist.
      Finished prerequisites of target file 
`glibcJ2/timezone/testdata/Europe/Berlin'.
     Must remake target `glibcJ2/timezone/testdata/Europe/Berlin'.
Invoking recipe from Makefile:110 to update target 
`glibcJ2/timezone/testdata/Europe/Berlin'.
 > timezone/testdata/Europe/Berlin.test-result
     Considering target file `glibcJ2/timezone/testdata/Universal'.
      File `glibcJ2/timezone/testdata/Universal' does not exist.
      Finished prerequisites of target file 
`glibcJ2/timezone/testdata/Universal'.
     Must remake target `glibcJ2/timezone/testdata/Universal'.
Invoking recipe from Makefile:108 to update target 
`glibcJ2/timezone/testdata/Universal'.
 > timezone/testdata/Universal.test-result
 > timezone/testdata/Australia/Melbourne.test-result
 > timezone/testdata/America/Sao_Paulo.test-result
 > timezone/testdata/Asia/Tokyo.test-result
   Considering target file `glibcJ2/timezone/test-tz.out'.
    File `glibcJ2/timezone/test-tz.out' does not exist.
     Considering target file `glibcJ2/timezone/testdata/America/New_York'.
     File `glibcJ2/timezone/testdata/America/New_York' was considered 
already.
     Considering target file `glibcJ2/timezone/testdata/Etc/UTC'.
     File `glibcJ2/timezone/testdata/Etc/UTC' was considered already.
     Considering target file `glibcJ2/timezone/testdata/UTC'.
     File `glibcJ2/timezone/testdata/UTC' was considered already.
    Finished prerequisites of target file `glibcJ2/timezone/test-tz.out'.
   Must remake target `glibcJ2/timezone/test-tz.out'.
Invoking recipe from ../Rules:200 to update target 
`glibcJ2/timezone/test-tz.out'.
 > timezone/test-tz.test-result
 > timezone/tst-timezone.test-result


Bye

On 04/16/2014 12:19 PM, Andreas Schwab wrote:
> Stefan Liebler <stli@linux.vnet.ibm.com> writes:
>
>> According to the output of make, Etc/UTC is called directly before UTC
>> and both targets collide in parallel execution.
>
> In which way do they collide?
>
> Andreas.
>
Andreas Schwab April 16, 2014, 3:28 p.m. UTC | #4
That has nothing to do with parallel execution, but only with the fact
that the pattern rule creates two targets with a single command, but it
is unspecified which target triggers it.  There are no races involved.

Andreas.
H.J. Lu April 16, 2014, 3:28 p.m. UTC | #5
On Wed, Apr 16, 2014 at 8:21 AM, Stefan Liebler <stli@linux.vnet.ibm.com> wrote:
> I´ve tested the different cases:
> -(1) .NOTPARALLEL Makefile with -j2
> -(2) original Makefile with -j2
>
>
> The difference is, that in case (1) timezone/testdata/UTC.test-result is
> generated by the rule
>
> %/UTC %/Universal: simplebackw $(zic-deps) %/Etc/UTC
>         $(build-testdata)
> and timezone/testdata/Universal.test-result does not exist.
>
> In case (2) it is vice versa.
> timezone/testdata/Universal.test-result exists,
> but timezone/testdata/UTC.test-result does not, which leads to the
> unresolved test.
> In case (1) it is no UNRESOLVED-test, because Universal is not added to
> test-special:
> test-zones := America/New_York Etc/UTC UTC Europe/Berlin \
>               Australia/Melbourne America/Sao_Paulo Asia/Tokyo
> tests-special += $(addprefix $(testdata)/, $(test-zones))
>
>
> In the following i excerpted the relevant lines of make --debug=v output:
> -(1) .NOTPARALLEL Makefile with -j2:
> ------------------------------------
>> timezone/testdata/America/New_York.test-result
>> timezone/testdata/Etc/UTC.test-result
>     Must remake target `glibcNOTPARALLEL/timezone/testdata/UTC'.
> Invoking recipe from Makefile:111 to update target
> `glibcNOTPARALLEL/timezone/testdata/UTC'.
>> timezone/testdata/UTC.test-result
>> timezone/test-tz.test-result
>> timezone/testdata/Europe/Berlin.test-result
>     Successfully remade target file
> `glibcNOTPARALLEL/timezone/testdata/Europe/Berlin'.
>     Considering target file `glibcNOTPARALLEL/timezone/testdata/Universal'.
>     File `glibcNOTPARALLEL/timezone/testdata/Universal' was considered
> already.
>     Considering target file
> `glibcNOTPARALLEL/timezone/testdata/Australia/Melbourne'.
>      File `glibcNOTPARALLEL/timezone/testdata/Australia/Melbourne' does not
> exist.
>> timezone/testdata/Australia/Melbourne.test-result
>> timezone/testdata/America/Sao_Paulo.test-result
>> timezone/testdata/Asia/Tokyo.test-result
>> timezone/tst-timezone.test-result
>
>
> -(2) original Makefile with -j2:
> --------------------------------
>> timezone/testdata/America/New_York.test-result
>> timezone/testdata/Etc/UTC.test-result
>     Recipe of `glibcJ2/timezone/testdata/Etc/UTC' is being run.
>     Considering target file `glibcJ2/timezone/testdata/UTC'.
>      File `glibcJ2/timezone/testdata/UTC' does not exist.
>      Finished prerequisites of target file `glibcJ2/timezone/testdata/UTC'.
>     The prerequisites of `glibcJ2/timezone/testdata/UTC' are being made.
>    Finished prerequisites of target file `glibcJ2/timezone/test-tz.out'.
>   The prerequisites of `glibcJ2/timezone/test-tz.out' are being made.
>   Considering target file `glibcJ2/timezone/tst-timezone.out'.
>    File `glibcJ2/timezone/tst-timezone.out' does not exist.
>     Considering target file `glibcJ2/timezone/tst-timezone'.
>     File `glibcJ2/timezone/tst-timezone' was considered already.
>     Considering target file `glibcJ2/timezone/testdata/Europe/Berlin'.
>      File `glibcJ2/timezone/testdata/Europe/Berlin' does not exist.
>      Finished prerequisites of target file
> `glibcJ2/timezone/testdata/Europe/Berlin'.
>     Must remake target `glibcJ2/timezone/testdata/Europe/Berlin'.
> Invoking recipe from Makefile:110 to update target
> `glibcJ2/timezone/testdata/Europe/Berlin'.
>> timezone/testdata/Europe/Berlin.test-result
>     Considering target file `glibcJ2/timezone/testdata/Universal'.
>      File `glibcJ2/timezone/testdata/Universal' does not exist.
>      Finished prerequisites of target file
> `glibcJ2/timezone/testdata/Universal'.
>     Must remake target `glibcJ2/timezone/testdata/Universal'.
> Invoking recipe from Makefile:108 to update target
> `glibcJ2/timezone/testdata/Universal'.
>> timezone/testdata/Universal.test-result
>> timezone/testdata/Australia/Melbourne.test-result
>> timezone/testdata/America/Sao_Paulo.test-result
>> timezone/testdata/Asia/Tokyo.test-result
>   Considering target file `glibcJ2/timezone/test-tz.out'.
>    File `glibcJ2/timezone/test-tz.out' does not exist.
>     Considering target file `glibcJ2/timezone/testdata/America/New_York'.
>     File `glibcJ2/timezone/testdata/America/New_York' was considered
> already.
>     Considering target file `glibcJ2/timezone/testdata/Etc/UTC'.
>     File `glibcJ2/timezone/testdata/Etc/UTC' was considered already.
>     Considering target file `glibcJ2/timezone/testdata/UTC'.
>     File `glibcJ2/timezone/testdata/UTC' was considered already.
>    Finished prerequisites of target file `glibcJ2/timezone/test-tz.out'.
>   Must remake target `glibcJ2/timezone/test-tz.out'.
> Invoking recipe from ../Rules:200 to update target
> `glibcJ2/timezone/test-tz.out'.
>> timezone/test-tz.test-result
>> timezone/tst-timezone.test-result
>

Does it fix

https://sourceware.org/bugzilla/show_bug.cgi?id=14096
Stefan Liebler April 17, 2014, 1:48 p.m. UTC | #6
>
> Does it fix
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=14096
>
>

No. tst-timezone passes in both cases.

Patch
diff mbox

diff --git a/timezone/Makefile b/timezone/Makefile
index 998cd14..2f6e80e 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -85,6 +85,9 @@  GCONV_PATH=${common-objpfx}iconvdata LANGUAGE=C LC_ALL=C \
 $(evaluate-test)
 endef
 
+
+.NOTPARALLEL:
+
 $(objpfx)test-tz.out: $(addprefix $(testdata)/, America/New_York Etc/UTC UTC)
 $(objpfx)tst-timezone.out: $(addprefix $(testdata)/, \
 				       Europe/Berlin Universal \
@@ -102,7 +105,6 @@  $(testdata)/America/New_York: northamerica $(zic-deps)
 	$(build-testdata)
 $(testdata)/Etc/UTC: etcetera $(zic-deps)
 	$(build-testdata)
-# Use a pattern rule to indicate the command produces both targets at once.
 # Two separate targets built separately can collide if in parallel.
 %/UTC %/Universal: simplebackw $(zic-deps) %/Etc/UTC
 	$(build-testdata)