tests: Reduce runtime of tools/tracker/test_event_tracker tests
authorKienan Stewart <kstewart@efficios.com>
Tue, 26 Sep 2023 15:36:24 +0000 (11:36 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 21 Dec 2023 21:38:35 +0000 (16:38 -0500)
commitb9263e1ac5e563a689273b6ef6aa6f4d081cfb40
treeba612c0d05ebe3b9114834bc1e7ce2868feb8636
parentf52a7d1581ec1e62d8563fdcd455fec39eeadb93
tests: Reduce runtime of tools/tracker/test_event_tracker tests

Observed issue
==============

When running the test as root, so both UST and kernel tests are
exercised, this test takes about 100s to run on my development system.

Solution
========

By using session destroy with '--no-wait', the runtime is reduced by
30-40s. For the kernel tests in particular this introduces a detail to
keep in mind with regards to unloading the lttng-tests kernel
module. More details in the 'Known drawbacks' section.

The test applications (both userspace and kernel) also execute much
more quickly than the 0.5s sleep they are given. By reducing the sleep
to a hundreth of a second, another 15s or so can be shaved off the
test runtime.

Overall, the test runtime is reduced from 102s to 45s on my
development machine.

Known drawbacks
===============

If `modprobe -r lttng-tests` is run too quickly after the last session
destruction with `--no-wait`, the removal will fail. This patch uses a
simple one second sleep to give some time for the processes using that
module to get completely shutdown. I think it could be somewhat
brittle on systems that are slow or overcommitted; however, it seemed
more 'maintainable' than remembering to ensure that the last kernel
test session destruction doesn't use `--no-wait`.

Change-Id: Ib953ef22299d30507f46d2e6507fbd0f5641aa27
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/tools/tracker/test_event_tracker
This page took 0.024724 seconds and 4 git commands to generate.