Tests: live/test_{lttng_,}kernel: use lttng_test_filter_event instead of sched_switch
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 9 Jul 2020 20:44:32 +0000 (16:44 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 29 Jul 2020 17:02:17 +0000 (13:02 -0400)
commit074a63c45bb9123218df235126a51e9d47aa8863
tree5f3c23770e515e99d35c789b247a9b5e417dc574
parent56c86e0a3f16a2f7fd3e473dd8c9d753a13e86ee
Tests: live/test_{lttng_,}kernel: use lttng_test_filter_event instead of sched_switch

Background
==========
These tests currently rely on system load (the `sched_switch` event) to
generate trace data.

Issue
=====
This is can be problematic for the `test_kernel`
test case because it has a fixed sized buffer to store the trace:
  #define mmap_size 524288

This caused this test failure to randomly happen on my machine:
  ok 7 - Get one index per stream
  # mmap_size not big enough
  not ok 8 - Get one data packet for stream 0, offset 0, len 4096
  #     Failed test (live_test.c:main() at line 709)
  [error] Error detaching viewer session
  not ok 9 - Detach viewer session
  #     Failed test (live_test.c:main() at line 715)

Solution
========
Using the `lttng_test_filter_event` event to control the size and
number of the event expected in the trace rather then depending on how
many Electon apps are currently fighting for my CPUs.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I15d500d5becf9c5e526ae11ff0b2a2f4f6b753ac
tests/regression/tools/live/test_kernel
tests/regression/tools/live/test_lttng_kernel
This page took 0.025216 seconds and 4 git commands to generate.