]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
3286dfb5c1905020b9003f09e77fb487f7b29ca4
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From 6b45c5f80d20e7bbf3d98c1fa17d2cf8716af3bb Mon Sep 17 00:00:00 2001
2 From: Xiangyu Chen <xiangyu.chen@windriver.com>
3 Date: Mon, 25 Mar 2024 18:20:14 +0800
4 Subject: [PATCH] Fix: rotation-destroy-flush: fix session daemon abort if no
5 kernel module present
6
7 Testing rotation-destroy-flush when no lttng kernel modules present, it would
8 be failed with error message:
9
10 Error: Unable to load required module lttng-ring-buffer-client-discard
11 not ok 1 - Start session daemon
12 Failed test 'Start session daemon'
13 not ok 2 - Create session rotation_destroy_flush in -o /tmp/tmp.test_rot ...
14 ...
15
16 This because test script that sets the LTTNG_ABORT_ON_ERROR environment
17 variable. It's this environment variable that causes the sessiond to handle the
18 kernel module loading failure as an abort rather than a warning.
19
20 Using "check_skip_kernel_test" to detect whether the kernel module fails to
21 load is expected or not. If the failure is expected, the script won't set that
22 environment variable any more.
23
24 Fixes: 3a174400
25 ("tests:add check_skip_kernel_test to check root user and lttng kernel modules")
26
27 Upstream-Status: Submitted [https://review.lttng.org/c/lttng-tools/+/12155]
28
29 Change-Id: I371e9ba717613e2940186f710cf3cccd35baed6c
30 Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
31 ---
32 .../ust/rotation-destroy-flush/test_rotation_destroy_flush | 6 +++---
33 1 file changed, 3 insertions(+), 3 deletions(-)
34
35 diff --git a/tests/regression/ust/rotation-destroy-flush/test_rotation_destroy_flush b/tests/regression/ust/rotation-destroy-flush/test_rotation_destroy_flush
36 index 669bcbc43..64161768f 100755
37 --- a/tests/regression/ust/rotation-destroy-flush/test_rotation_destroy_flush
38 +++ b/tests/regression/ust/rotation-destroy-flush/test_rotation_destroy_flush
39 @@ -23,11 +23,11 @@ SIZE_LIMIT=$PAGE_SIZE
40 NR_ITER=10
41 NUM_TESTS=$((15*$NR_ITER))
42
43 -# Ensure the daemons invoke abort on error.
44 -export LTTNG_ABORT_ON_ERROR=1
45 -
46 source $TESTDIR/utils/utils.sh
47
48 +# Ensure the daemons invoke abort on error.
49 +check_skip_kernel_test || export LTTNG_ABORT_ON_ERROR=1
50 +
51 # MUST set TESTDIR before calling those functions
52 function run_app()
53 {
54 --
55 2.25.1
56