From: Jonathan Rajotte Date: Fri, 25 Mar 2022 18:26:38 +0000 (-0400) Subject: Fix: test: lttng kernel modules still loaded after running test_clock_override X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8f981892936f6af4f95adf6b6dd81f0463f3ba7c;p=lttng-tools.git Fix: test: lttng kernel modules still loaded after running test_clock_override Observed issue ============== After running test_clock_override, some lttng modules are still loaded. $ lsmod | ag lttng lttng_test 32768 0 lttng_tracer 2326528 1 lttng_test lttng_statedump 749568 1 lttng_tracer lttng_wrapper 16384 2 lttng_statedump,lttng_tracer lttng_uprobes 16384 1 lttng_tracer lttng_kprobes 16384 1 lttng_tracer lttng_lib_ring_buffer 61440 1 lttng_tracer lttng_kretprobes 16384 1 lttng_tracer lttng_clock_plugin_test 16384 1 lttng_clock 16384 2 lttng_tracer,lttng_clock_plugin_test Cause ===== The order in which the modules are removed is important. In `test_clock_override_timestamp` the last `modprobe --remove order` is modprobe --remove lttng-clock-plugin-test lttng-clock lttng-test While other callsites order is: modprobe --remove lttng-test lttng-clock-plugin-test lttng-clock Solution ======== Use modprobe --remove lttng-test lttng-clock-plugin-test lttng-clock Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau Change-Id: I528df2e3e90664433337a547a74cdbe476d4ee62 --- diff --git a/tests/regression/kernel/test_clock_override b/tests/regression/kernel/test_clock_override index 8f471def8..0a44f5f28 100755 --- a/tests/regression/kernel/test_clock_override +++ b/tests/regression/kernel/test_clock_override @@ -149,7 +149,7 @@ function test_clock_override_timestamp() destroy_lttng_session_ok $SESSION_NAME stop_lttng_sessiond - modprobe --remove lttng-clock-plugin-test lttng-clock lttng-test + modprobe --remove lttng-test lttng-clock-plugin-test lttng-clock # Use Babeltrace with "-n all" to give a comma separated list for # easy extraction of timestamps.