All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/6] Introduce a concept of test max_runtime
@ 2021-10-25 16:01 Cyril Hrubis
  2021-10-25 16:01 ` [LTP] [PATCH 1/6] lib: tst_test: Move timeout scaling out of fork_testrun() Cyril Hrubis
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Cyril Hrubis @ 2021-10-25 16:01 UTC (permalink / raw)
  To: ltp

This patchset introduces a concept of test max_runtime and convert all
tests that were (mis)using timeout to get around timeouts when a test
runtime was longer than expected timeout.

Generally this removes quite a bit of code and makes things simpler
since it's easier to set up a runtime and compute test timeout based on
that rather than the other way around.

If this gets merged I may follow up with other changes, there are a few
tests that deliberately set up timeout to be 10 or 20 seconds in order
to timeout faster than the default 360. So logicall followup would be
setting the default timeout somewhat shorter and get rid of these as
well.

Cyril Hrubis (6):
  lib: tst_test: Move timeout scaling out of fork_testrun()
  lib: Add .max_runtime and tst_remaining_runtime()
  mtest06/mmap3: Convert to tst_remaining_runtime()
  syscalls/gettimeofday02: Convert to tst_remaining_runtime()
  cve-2015-3290: convert tst_remining_runtime()
  lib: Add tst_set_runtime() & remove tst_set_timeout()

 include/tst_fuzzy_sync.h                      |  7 ++-
 include/tst_test.h                            | 19 +++++-
 include/tst_timer_test.h                      |  3 +
 lib/newlib_tests/.gitignore                   |  4 +-
 lib/newlib_tests/test18.c                     | 22 -------
 lib/newlib_tests/test_max_runtime01.c         | 28 +++++++++
 lib/newlib_tests/test_max_runtime02.c         | 29 +++++++++
 lib/newlib_tests/test_max_runtime03.c         | 35 +++++++++++
 lib/newlib_tests/tst_fuzzy_sync01.c           |  1 +
 lib/newlib_tests/tst_fuzzy_sync02.c           |  1 +
 lib/newlib_tests/tst_fuzzy_sync03.c           |  1 +
 lib/tst_test.c                                | 62 ++++++++++++-------
 lib/tst_timer_test.c                          |  4 +-
 runtest/mm                                    |  2 +-
 testcases/cve/cve-2014-0196.c                 |  1 +
 testcases/cve/cve-2015-3290.c                 |  8 +--
 testcases/cve/cve-2016-7117.c                 |  1 +
 testcases/cve/cve-2017-2671.c                 |  1 +
 testcases/kernel/crypto/af_alg02.c            |  4 +-
 testcases/kernel/crypto/af_alg07.c            |  1 +
 testcases/kernel/crypto/pcrypt_aead01.c       |  3 +-
 testcases/kernel/mem/mtest01/mtest01.c        |  9 ++-
 testcases/kernel/mem/mtest06/mmap1.c          | 27 ++------
 testcases/kernel/mem/mtest06/mmap3.c          | 12 +---
 testcases/kernel/mem/thp/thp04.c              |  1 +
 testcases/kernel/pty/pty03.c                  |  1 +
 testcases/kernel/pty/pty05.c                  |  1 +
 testcases/kernel/sound/snd_seq01.c            |  2 +-
 testcases/kernel/sound/snd_timer01.c          |  1 +
 testcases/kernel/syscalls/bind/bind06.c       |  2 +-
 .../clock_nanosleep/clock_nanosleep02.c       |  1 +
 .../syscalls/epoll_pwait/epoll_pwait03.c      |  1 +
 .../kernel/syscalls/epoll_wait/epoll_wait02.c |  1 +
 .../kernel/syscalls/epoll_wait/epoll_wait04.c |  2 +-
 .../syscalls/futex/futex_cmp_requeue01.c      |  2 +-
 .../kernel/syscalls/futex/futex_wait05.c      |  1 +
 .../syscalls/gettimeofday/gettimeofday02.c    | 35 +----------
 testcases/kernel/syscalls/inotify/inotify09.c |  1 +
 .../kernel/syscalls/ipc/shmctl/shmctl05.c     |  2 +-
 .../kernel/syscalls/move_pages/move_pages12.c |  4 +-
 .../kernel/syscalls/nanosleep/nanosleep01.c   |  1 +
 testcases/kernel/syscalls/poll/poll02.c       |  1 +
 testcases/kernel/syscalls/prctl/prctl09.c     |  1 +
 testcases/kernel/syscalls/pselect/pselect01.c |  1 +
 testcases/kernel/syscalls/select/select02.c   |  1 +
 testcases/kernel/syscalls/sendmsg/sendmsg03.c |  1 +
 .../kernel/syscalls/setsockopt/setsockopt06.c |  1 +
 .../kernel/syscalls/setsockopt/setsockopt07.c |  1 +
 .../syscalls/timerfd/timerfd_settime02.c      |  1 +
 testcases/kernel/syscalls/writev/writev03.c   |  1 +
 testcases/network/can/cve/can_bcm01.c         |  1 +
 testcases/network/packet/fanout01.c           |  1 +
 testcases/network/sockets/vsock01.c           |  1 +
 53 files changed, 219 insertions(+), 137 deletions(-)
 delete mode 100644 lib/newlib_tests/test18.c
 create mode 100644 lib/newlib_tests/test_max_runtime01.c
 create mode 100644 lib/newlib_tests/test_max_runtime02.c
 create mode 100644 lib/newlib_tests/test_max_runtime03.c

-- 
2.32.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-11-03 11:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 16:01 [LTP] [PATCH 0/6] Introduce a concept of test max_runtime Cyril Hrubis
2021-10-25 16:01 ` [LTP] [PATCH 1/6] lib: tst_test: Move timeout scaling out of fork_testrun() Cyril Hrubis
2021-10-25 16:01 ` [LTP] [PATCH 2/6] lib: Add .max_runtime and tst_remaining_runtime() Cyril Hrubis
2021-10-26 11:42   ` Jan Stancek
2021-10-26 12:49     ` Cyril Hrubis
2021-11-03  9:34   ` Richard Palethorpe
2021-11-03 11:09     ` Cyril Hrubis
2021-10-25 16:01 ` [LTP] [PATCH 3/6] mtest06/mmap3: Convert to tst_remaining_runtime() Cyril Hrubis
2021-10-25 16:01 ` [LTP] [PATCH 4/6] syscalls/gettimeofday02: " Cyril Hrubis
2021-10-25 16:01 ` [LTP] [PATCH 5/6] cve-2015-3290: convert tst_remining_runtime() Cyril Hrubis
2021-10-25 16:01 ` [LTP] [PATCH 6/6] lib: Add tst_set_runtime() & remove tst_set_timeout() Cyril Hrubis
2021-10-26  6:16   ` Li Wang
2021-10-26  7:14     ` Cyril Hrubis
2021-10-26  7:44       ` Li Wang
2021-10-26  7:56         ` Cyril Hrubis
2021-10-26  8:29           ` Li Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.