Increase timeout of libio/tst-readline

Message ID e9960b99-c83a-d0ae-1fda-3610e3f1bd32@arm.com
State New
Headers show
Series
  • Increase timeout of libio/tst-readline
Related show

Commit Message

Szabolcs Nagy Oct. 9, 2018, 2:19 p.m.
Increase timeout from the default 20s to 100s. This test makes close to
20 million syscalls with distribution:

12327675 read
 4143204 lseek
  929475 close
  929471 openat
   92817 fstat
    1431 write
...

The default timeout assumes each can finish in 1us on average which
is not true on slow machines.

2018-10-09  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* libio/tst-readline.c (TIMEOUT): Define.

Comments

Carlos O'Donell Oct. 9, 2018, 2:50 p.m. | #1
On 10/9/18 10:19 AM, Szabolcs Nagy wrote:
> Increase timeout from the default 20s to 100s. This test makes close to
> 20 million syscalls with distribution:
> 
> 12327675 read
>  4143204 lseek
>   929475 close
>   929471 openat
>    92817 fstat
>     1431 write
> ...
> 
> The default timeout assumes each can finish in 1us on average which
> is not true on slow machines.
> 
> 2018-10-09  Szabolcs Nagy  <szabolcs.nagy@arm.com>
> 
> 	* libio/tst-readline.c (TIMEOUT): Define.
> 

OK for master. I think 100s is OK, particularly because on fast machines
the test will be fast, and it's unlikely to be slowed down by anything
or get stuck anywhere (no poll/epoll usage etc).

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

Patch

diff --git a/libio/tst-readline.c b/libio/tst-readline.c
index 9322ef68da..63f5227760 100644
--- a/libio/tst-readline.c
+++ b/libio/tst-readline.c
@@ -232,5 +232,6 @@  do_test (void)
   return 0;
 }
 
+#define TIMEOUT 100
 #define PREPARE prepare
 #include <support/test-driver.c>