Fix: tests: test definitions arrays contain invalid data
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 11 Mar 2022 18:39:58 +0000 (13:39 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 16 Mar 2022 20:59:13 +0000 (16:59 -0400)
Observed issue
==============

The long_regression Ci job fails on test_thread_stall.

 11:17:16 # export LTTNG_SESSION_CONFIG_XSD_PATH=/home/jenkins/workspace/lttng-tools_master_long_regression/arch/amd64/babeltrace_version/stable-2.0/build/std/conf/std/liburcu_version/master/test_type/full/src/lttng-tools/tests/../src/common/
 11:17:16 # env /home/jenkins/workspace/lttng-tools_master_long_regression/arch/amd64/babeltrace_version/stable-2.0/build/std/conf/std/liburcu_version/master/test_type/full/src/lttng-tools/tests/../src/bin/lttng-sessiond/lttng-sessiond --background --consumerd64-path=/home/jenkins/workspace/lttng-tools_master_long_regression/arch/amd64/babeltrace_version/stable-2.0/build/std/conf/std/liburcu_version/master/test_type/full/src/lttng-tools/tests/../src/bin/lttng-consumerd/lttng-consumerd 1
 11:17:16 ok 16 - Start session daemon
 11:17:16 # Check after running for 30 seconds
 11:17:16 not ok 17 - Validation failure
 11:17:16 #   Failed test 'Validation failure'
 11:17:16 #   in /home/jenkins/workspace/lttng-tools_master_long_regression/arch/amd64/babeltrace_version/stable-2.0/build/std/conf/std/liburcu_version/master/test_type/full/src/lttng-tools/tests/regression/tools/health/../../../utils/tap/tap.sh:fail() at line 159.
 11:17:16 # Health returned:
 11:17:16 # stdout:
 11:17:16 # stderr:
 11:17:16 # Killing (signal SIGKILL) lttng-sessiond and lt-lttng-sessiond pids: 1840601 1840602
 11:17:16 ok 18 - Wait after kill session daemon

 ...

 17:57:01 # Test health problem detection with LTTNG_RELAYD_THREAD_DISPATCHER
 17:57:01 # Start session daemon
 17:57:01 # export LTTNG_SESSION_CONFIG_XSD_PATH=/home/jenkins/workspace/lttng-tools_master_long_regression/arch/amd64/babeltrace_version/stable-2.0/build/std/conf/std/liburcu_version/master/test_type/full/src/lttng-tools/tests/../src/common/
 17:57:01 # env /home/jenkins/workspace/lttng-tools_master_long_regression/arch/amd64/babeltrace_version/stable-2.0/build/std/conf/std/liburcu_version/master/test_type/full/src/lttng-tools/tests/../src/bin/lttng-sessiond/lttng-sessiond --background --consumerd64-path=/home/jenkins/workspace/lttng-tools_master_long_regression/arch/amd64/babeltrace_version/stable-2.0/build/std/conf/std/liburcu_version/master/test_type/full/src/lttng-tools/tests/../src/bin/lttng-consumerd/lttng-consumerd 1
 17:57:01 ok 38 - Start session daemon
 17:57:01 # /home/jenkins/workspace/lttng-tools_master_long_regression/arch/amd64/babeltrace_version/stable-2.0/build/std/conf/std/liburcu_version/master/test_type/full/src/lttng-tools/tests/regression/tools/health/../../../../src/bin/lttng/lttng create health_thread_stall --no-output
 17:57:01 ok 39 - Create session health_thread_stall in no-output mode
 17:57:01 # With UST consumer daemons
 17:57:01 # /home/jenkins/workspace/lttng-tools_master_long_regression/arch/amd64/babeltrace_version/stable-2.0/build/std/conf/std/liburcu_version/master/test_type/full/src/lttng-tools/tests/regression/tools/health/../../../../src/bin/lttng/lttng enable-event tp:tptest -c testchan -s health_thread_stall -u
 17:57:01 ok 40 - Enable ust event tp:tptest for session health_thread_stall
 17:57:01 ok 41 # skip: Root access is needed. Skipping kernel consumer health check test.
 17:57:01 # /home/jenkins/workspace/lttng-tools_master_long_regression/arch/amd64/babeltrace_version/stable-2.0/build/std/conf/std/liburcu_version/master/test_type/full/src/lttng-tools/tests/regression/tools/health/../../../../src/bin/lttng/lttng start health_thread_stall
 17:57:01 ok 42 - Start tracing for session health_thread_stall
 17:57:01 # Check after running for 30 seconds
 17:57:01 not ok 43 - Validation failure
 17:57:01 #   Failed test 'Validation failure'
 17:57:01 #   in /home/jenkins/workspace/lttng-tools_master_long_regression/arch/amd64/babeltrace_version/stable-2.0/build/std/conf/std/liburcu_version/master/test_type/full/src/lttng-tools/tests/regression/tools/health/../../../utils/tap/tap.sh:fail() at line 159.
 17:57:01 # Health returned:
 17:57:01 # stdout:
 17:57:01 # stderr:
 17:57:01 # Killing (signal SIGTERM) lttng-consumerd pids: 690297 690299
 17:57:01 Error: consumer closed the command socket
 17:57:01 Error: Health error occurred in thread_consumer_management
 17:57:01 ok 44 - Wait after kill consumer daemon

Cause
=====

After investigation, commit 3c3390532736cfb5198f863d0d2b218e21fcf76d [1]
introduces the test regression.

Albeit [1] removes `LTTNG_SESSIOND_THREAD_HT_CLEANUP` from the `THREAD`
array and the corresponding error message in `ERROR_STRING`, it does not
modify the `NEEDS_ROOT`, `TEST_CONSUMERD` and `TEST_RELAYD` arrays.

Also the test count is not adjusted to reflect the removal of the
`THREAD` element.

Solution
========

Remove the unused data from `NEEDS_ROOT`, `TEST_CONSUMERD` and
`TEST_RELAYD` and adjust the test count.

Known drawbacks
=========

None.

References
==========

[1] https://github.com/lttng/lttng-tools/commit/3c3390532736cfb5198f863d0d2b218e21fcf76d

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I9c16fa8d76b41f1a28fd342d9f076969f4ff1b13

tests/regression/tools/health/test_health.sh

index f586a299dbf02443d43a05b3b07b388ff9816eb0..01da978a92147c8b20a83e161db8873c1e3e8c9c 100644 (file)
@@ -8,7 +8,7 @@ UST_EVENT_NAME="tp:tptest"
 KERNEL_EVENT_NAME="sched_switch"
 CHANNEL_NAME="testchan"
 HEALTH_CHECK_BIN="health_check"
-NUM_TESTS=99
+NUM_TESTS=96
 SLEEP_TIME=30
 
 source $TESTDIR/utils/utils.sh
@@ -212,7 +212,6 @@ NEEDS_ROOT=(
        0
        0
        0
-       0
        1
 
        0
@@ -234,7 +233,6 @@ TEST_CONSUMERD=(
        0
        0
        0
-       0
 
        1
        1
@@ -255,7 +253,6 @@ TEST_RELAYD=(
        0
        0
        0
-       0
 
        0
        0
This page took 0.028317 seconds and 5 git commands to generate.