Fix: rotation-destroy-flush: fix session daemon abort if no kernel module present
authorXiangyu Chen <xiangyu.chen@windriver.com>
Mon, 25 Mar 2024 10:20:14 +0000 (18:20 +0800)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 9 Apr 2024 17:18:36 +0000 (13:18 -0400)
commit78f5b22de60c114c5c83410015a08bdd212edc0b
tree7154f0b2f3830d9cd02ca4560b070735b1177bb0
parent9fed015cbc40e9323cca8f22702eb17ba1d9c2f2
Fix: rotation-destroy-flush: fix session daemon abort if no kernel module present

Testing rotation-destroy-flush when no lttng kernel modules present, it
would be failed with error message:

  Error: Unable to load required module lttng-ring-buffer-client-discard
  not ok 1 - Start session daemon
  Failed test 'Start session daemon'
  not ok 2 - Create session rotation_destroy_flush in -o /tmp/tmp.test_rot ...
  ...

This because test script that sets the LTTNG_ABORT_ON_ERROR environment
variable. It's this environment variable that causes the sessiond to
handle the kernel module loading failure as an abort rather than a
warning.

Using "check_skip_kernel_test" to detect whether the kernel module fails
to load is expected or not. If the failure is expected, the script won't
set that environment variable any more.

Fixes: 3a174400
("tests:add check_skip_kernel_test to check root user and lttng kernel modules")

Change-Id: I371e9ba717613e2940186f710cf3cccd35baed6c
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/ust/rotation-destroy-flush/test_rotation_destroy_flush
This page took 0.025022 seconds and 4 git commands to generate.