tests: Use destroy with no-wait during filter tests
authorKienan Stewart <kstewart@efficios.com>
Wed, 6 Sep 2023 15:56:45 +0000 (11:56 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 21 Dec 2023 21:38:35 +0000 (16:38 -0500)
commitcdcf8972424da5cba4c0210d7fdfa2e7123aa748
tree2ed17cf4b5a488e12a119234bab3596d3fde3095
parent8e023ed42dff12632a5096a3b2d6c25d144bdbfb
tests: Use destroy with no-wait during filter tests

Motivation
==========

The regression/tool/sfiltering/test_valid_filter test is one of the
longest running tests in the test suite, largely due to the number of
filters tested.

The session destroy step for each test takes in the order of 500-600ms
on my development machine and accounts for an important sum of time
across a run as each filter test will create and destroy a session.

Solution
========

By passing "--no-wait" to the session destroy command, the step time
is reduced from 500-600ms to ~20ms. The overall test time is
reduced (when running without root tests) from ~150s to ~40s.

Using "--no-wait" with the session destroy seems safe in this case as
the session stop is called before, which will finalize the writes to
disk.

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

The patch causes errors similar to the following to be logged to
stderr:

```
PERROR - 11:55:26.730314528 [Rotation]: sendmsg: Broken pipe (in lttcomm_send_unix_sock() at unix.cpp:300)
Error: Failed to send result of the destruction of session "valid_filter" to client
```

Change-Id: Ic005116bbe910cb3da3e99aa85dc90244ed72f5b
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/tools/filtering/test_valid_filter
tests/utils/utils.sh
This page took 0.024367 seconds and 4 git commands to generate.