nptl/tst-robust-fork: Increase timeout to 30 seconds.

Message ID b063169a-ac91-8b6d-f052-b7b75e4534ce@redhat.com
State Committed
Headers

Commit Message

Carlos O'Donell May 18, 2017, 6:59 p.m. UTC
  The default test timeout is 20 seconds.

On certain x86_64 hardware I can see tst-robust-fork test take 22 seconds on average.

This results in spurious failures.

I suggest we increase the timeout to 25 seconds and add a note about this.

If nobody objects I'll check this in at some point next week when I get a
free minute.

I don't know if it's particularly useful to list the kernel version or
hardware under which the slow timing came from i.e. linux 4.10 on an older
i5-4690K.

2017-05-18  Carlos O'Donell  <carlos@redhat.com>

	* nptl/tst-robust-fork.c (TIMEOUT): Define.

---
  

Comments

Siddhesh Poyarekar May 18, 2017, 7:05 p.m. UTC | #1
On Friday 19 May 2017 12:29 AM, Carlos O'Donell wrote:
> The default test timeout is 20 seconds.
> 
> On certain x86_64 hardware I can see tst-robust-fork test take 22 seconds on average.
> 
> This results in spurious failures.
> 
> I suggest we increase the timeout to 25 seconds and add a note about this.
> 
> If nobody objects I'll check this in at some point next week when I get a
> free minute.
> 
> I don't know if it's particularly useful to list the kernel version or
> hardware under which the slow timing came from i.e. linux 4.10 on an older
> i5-4690K.

LGTM.

Siddhesh
  
Tulio Magno Quites Machado Filho May 18, 2017, 7:28 p.m. UTC | #2
Carlos O'Donell <carlos@redhat.com> writes:

> The default test timeout is 20 seconds.
>
> On certain x86_64 hardware I can see tst-robust-fork test take 22 seconds on average.
>
> This results in spurious failures.
>
> I suggest we increase the timeout to 25 seconds and add a note about this.
>
> If nobody objects I'll check this in at some point next week when I get a
> free minute.
>
> I don't know if it's particularly useful to list the kernel version or
> hardware under which the slow timing came from i.e. linux 4.10 on an older
> i5-4690K.
>
> 2017-05-18  Carlos O'Donell  <carlos@redhat.com>
>
> 	* nptl/tst-robust-fork.c (TIMEOUT): Define.

I agree with this change.

I have already proposed another patch increasing it to 35s [1].
IMO, 25 is too close to the time we both measured.

By the way, it isn't restricted to x86_64.  I've seen this on powerpc as well.

[1] https://patchwork.sourceware.org/patch/19174/
  
Adhemerval Zanella May 18, 2017, 7:46 p.m. UTC | #3
On 18/05/2017 15:59, Carlos O'Donell wrote:
> The default test timeout is 20 seconds.
> 
> On certain x86_64 hardware I can see tst-robust-fork test take 22 seconds on average.
> 
> This results in spurious failures.
> 
> I suggest we increase the timeout to 25 seconds and add a note about this.
> 
> If nobody objects I'll check this in at some point next week when I get a
> free minute.
> 
> I don't know if it's particularly useful to list the kernel version or
> hardware under which the slow timing came from i.e. linux 4.10 on an older
> i5-4690K.

Which are the constraint that increase the time required for such test
(cpu count, latency, memory latency, kernel version, etc.)?

> 
> 2017-05-18  Carlos O'Donell  <carlos@redhat.com>
> 
> 	* nptl/tst-robust-fork.c (TIMEOUT): Define.
> 
> diff --git a/nptl/tst-robust-fork.c b/nptl/tst-robust-fork.c
> index 4a12ff0..d2c8a5a 100644
> --- a/nptl/tst-robust-fork.c
> +++ b/nptl/tst-robust-fork.c
> @@ -25,6 +25,12 @@
>  #include <support/xunistd.h>
>  #include <sys/mman.h>
>  
> +/* This test can take as long as 22 seconds on some x86_64 hardware,
> +   so increase the timeout to 25 seconds to allow it to pass.  More
> +   than half of the time is spent in page_fault() in the kernel and
> +   do_lookup_x() in ld.so.  */
> +#define TIMEOUT 25
> +
>  /* Data shared between processes. */
>  struct shared
>  {
> ---
>
  

Patch

diff --git a/nptl/tst-robust-fork.c b/nptl/tst-robust-fork.c
index 4a12ff0..d2c8a5a 100644
--- a/nptl/tst-robust-fork.c
+++ b/nptl/tst-robust-fork.c
@@ -25,6 +25,12 @@ 
 #include <support/xunistd.h>
 #include <sys/mman.h>
 
+/* This test can take as long as 22 seconds on some x86_64 hardware,
+   so increase the timeout to 25 seconds to allow it to pass.  More
+   than half of the time is spent in page_fault() in the kernel and
+   do_lookup_x() in ld.so.  */
+#define TIMEOUT 25
+
 /* Data shared between processes. */
 struct shared
 {