summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorXiangyu Chen <xiangyu.chen@windriver.com>2024-04-03 11:21:07 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-04-04 14:05:03 +0100
commitf938563eeab300ced8c1c26e05aaac3087cf75d3 (patch)
tree29485252a0d2955cc1be0844a439f00b474cfc15 /meta/recipes-kernel
parente6da241f294ea0e5ecd7fb22def149fb5af1b356 (diff)
downloadpoky-f938563eeab300ced8c1c26e05aaac3087cf75d3.tar.gz
lttng-tools: fix rotation-destroy-flush test fails if no kernel module present
lttng-tools supports testing the userspace application without kernel module since oe-core commit e0d8494b, this is a fix that testcase rotation-destroy-flush report LTTNG_ABORT_ON_ERROR when no lttng kernel module present. Fixes: e0d8494b (lttng-tools: skip kernel tests if no kernel modules present) (From OE-Core rev: 34b6554f9f889e84ab6004c4af87e0714b8263c4) Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch56
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.13.11.bb1
2 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch
new file mode 100644
index 0000000000..3286dfb5c1
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch
@@ -0,0 +1,56 @@
1From 6b45c5f80d20e7bbf3d98c1fa17d2cf8716af3bb Mon Sep 17 00:00:00 2001
2From: Xiangyu Chen <xiangyu.chen@windriver.com>
3Date: Mon, 25 Mar 2024 18:20:14 +0800
4Subject: [PATCH] Fix: rotation-destroy-flush: fix session daemon abort if no
5 kernel module present
6
7Testing rotation-destroy-flush when no lttng kernel modules present, it would
8be 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
16This because test script that sets the LTTNG_ABORT_ON_ERROR environment
17variable. It's this environment variable that causes the sessiond to handle the
18kernel module loading failure as an abort rather than a warning.
19
20Using "check_skip_kernel_test" to detect whether the kernel module fails to
21load is expected or not. If the failure is expected, the script won't set that
22environment variable any more.
23
24Fixes: 3a174400
25("tests:add check_skip_kernel_test to check root user and lttng kernel modules")
26
27Upstream-Status: Submitted [https://review.lttng.org/c/lttng-tools/+/12155]
28
29Change-Id: I371e9ba717613e2940186f710cf3cccd35baed6c
30Signed-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
35diff --git a/tests/regression/ust/rotation-destroy-flush/test_rotation_destroy_flush b/tests/regression/ust/rotation-destroy-flush/test_rotation_destroy_flush
36index 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--
552.25.1
56
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.13.11.bb b/meta/recipes-kernel/lttng/lttng-tools_2.13.11.bb
index 08144e271c..f6abd9e11a 100644
--- a/meta/recipes-kernel/lttng/lttng-tools_2.13.11.bb
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.13.11.bb
@@ -38,6 +38,7 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
38 file://disable-tests.patch \ 38 file://disable-tests.patch \
39 file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \ 39 file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \
40 file://0001-tests-add-check_skip_kernel_test-to-check-root-user-.patch \ 40 file://0001-tests-add-check_skip_kernel_test-to-check-root-user-.patch \
41 file://0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch \
41 " 42 "
42 43
43SRC_URI[sha256sum] = "ac5baeef9fa690936b1ca01ecd1742da762c2c08511ff1b4e923938d94d0f979" 44SRC_URI[sha256sum] = "ac5baeef9fa690936b1ca01ecd1742da762c2c08511ff1b4e923938d94d0f979"