Tests: add kernel test into the `make check` test suite.
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 31 Jan 2022 19:47:35 +0000 (14:47 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 28 Feb 2022 22:11:34 +0000 (17:11 -0500)
The Jenkins CI mostly run the `make check` suite. Only the Lava base CI
run the root_regression test suite. Most of those test can be run on
`make check` without incurring any major extra time.

Only `regression/tools/streaming/test_high_throughput_limits` is left in
root_regression since it is currently "unreasonable" in term of the time
it takes to run. This could be tackled another time.

Change-Id: I29d40fa8bec872bf2e22a8bd933f58fa6376ee22
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
12 files changed:
tests/regression/Makefile.am
tests/regression/kernel/test_all_events
tests/regression/kernel/test_callstack
tests/regression/kernel/test_clock_override
tests/regression/kernel/test_event_basic
tests/regression/kernel/test_lttng_logger
tests/regression/kernel/test_ns_contexts_change
tests/regression/kernel/test_rotation_destroy_flush
tests/regression/kernel/test_select_poll_epoll
tests/regression/kernel/test_syscall
tests/regression/kernel/test_userspace_probe
tests/root_regression

index 73e49c99798be4879e4acbe7227b4f80d68f1fbc..bea2b97fbac110d5bcf662a63a3c9f7b23b5d3d5 100644 (file)
@@ -7,40 +7,46 @@ LOG_DRIVER = env PGREP='$(PGREP)' AM_TAP_AWK='$(AWK)' $(SHELL) \
        $(top_srcdir)/tests/utils/tap-driver.sh
 
 TESTS = tools/base-path/test_ust \
+       tools/clear/test_kernel \
+       tools/clear/test_ust \
+       tools/crash/test_crash \
+       tools/exclusion/test_exclusion \
        tools/filtering/test_invalid_filter \
        tools/filtering/test_unsupported_op \
        tools/filtering/test_valid_filter \
-       tools/streaming/test_ust \
        tools/health/test_thread_ok \
+       tools/live/test_kernel \
+       tools/live/test_lttng_kernel \
+       tools/live/test_lttng_ust \
        tools/live/test_ust \
        tools/live/test_ust_tracefile_count \
-       tools/live/test_lttng_ust \
-       tools/tracefile-limits/test_tracefile_count \
-       tools/tracefile-limits/test_tracefile_size \
-       tools/exclusion/test_exclusion \
-       tools/snapshots/test_ust_fast \
-       tools/snapshots/test_ust_streaming \
-       tools/save-load/test_save \
-       tools/save-load/test_load \
-       tools/save-load/test_autoload \
+       tools/metadata/test_kernel \
        tools/mi/test_mi \
-       tools/wildcard/test_event_wildcard \
-       tools/crash/test_crash \
-       tools/regen-metadata/test_ust \
-       tools/regen-statedump/test_ust \
-       tools/notification/test_notification_ust \
        tools/notification/test_notification_kernel \
        tools/notification/test_notification_multi_app \
-       tools/rotation/test_ust \
+       tools/notification/test_notification_ust \
+       tools/regen-metadata/test_kernel \
+       tools/regen-metadata/test_ust \
+       tools/regen-statedump/test_kernel \
+       tools/regen-statedump/test_ust \
        tools/rotation/test_kernel \
        tools/rotation/test_save_load_mi \
        tools/rotation/test_schedule_api \
-       tools/metadata/test_kernel \
-       tools/working-directory/test_relayd_working_directory \
-       tools/notification/test_notification_multi_app \
-       tools/clear/test_ust \
-       tools/clear/test_kernel \
-       tools/tracker/test_event_tracker
+       tools/rotation/test_ust \
+       tools/save-load/test_autoload \
+       tools/save-load/test_load \
+       tools/save-load/test_save \
+       tools/snapshots/test_kernel \
+       tools/snapshots/test_kernel_streaming \
+       tools/snapshots/test_ust_fast \
+       tools/snapshots/test_ust_streaming \
+       tools/streaming/test_kernel \
+       tools/streaming/test_ust \
+       tools/tracefile-limits/test_tracefile_count \
+       tools/tracefile-limits/test_tracefile_size \
+       tools/tracker/test_event_tracker \
+       tools/wildcard/test_event_wildcard \
+       tools/working-directory/test_relayd_working_directory
 
 if HAVE_LIBLTTNG_UST_CTL
 SUBDIRS += ust
@@ -63,7 +69,8 @@ TESTS += ust/before-after/test_before_after \
        ust/namespaces/test_ns_contexts \
        ust/namespaces/test_ns_contexts_change \
        tools/metadata/test_ust \
-       tools/relayd-grouping/test_ust
+       tools/relayd-grouping/test_ust \
+       ust/test_event_perf
 endif # HAVE_LIBLTTNG_UST_CTL
 
 if PYTHON_BINDING
@@ -76,3 +83,17 @@ TESTS += ust/linking/test_linking \
        ust/ust-dl/test_ust-dl \
        ust/type-declarations/test_type_declarations
 endif
+
+TESTS += kernel/test_all_events \
+       kernel/test_callstack \
+       kernel/test_channel \
+       kernel/test_clock_override \
+       kernel/test_event_basic \
+       kernel/test_lttng_logger \
+       kernel/test_ns_contexts \
+       kernel/test_ns_contexts_change \
+       kernel/test_rotation_destroy_flush \
+       kernel/test_select_poll_epoll \
+       kernel/test_syscall \
+       kernel/test_userspace_probe
+
index c700de823f11224ada59d1efe2cf0c2f34be963a..e326bfa5e0eb233cf2b5236537e11bfcca42699a 100755 (executable)
@@ -51,6 +51,7 @@ fi
 
 skip $isroot "Root access is needed. Skipping all tests." $NUM_TESTS ||
 {
+       validate_lttng_modules_present
        start_lttng_sessiond
 
        test_all_event
index c4a6200dae0351e2ad86ee727d11631fec0f28fb..b92ed12d90ed646592da3b3bbb11b1fd2c7dd1a6 100755 (executable)
@@ -144,6 +144,7 @@ skip $isroot "Root access is needed. Skipping all tests." "$NUM_TESTS" ||
        test $? -ne 0
        skip $? "Babeltrace binary not found. Skipping callstack tests" "$NUM_TESTS" ||
        {
+               validate_lttng_modules_present
                start_lttng_sessiond
 
                if test $RUN_USERSPACE_TEST == 1; then
index 4b185db89f7e4ef9808575b44cc237c7f7e16cc4..56f2061344e6262a6829ff56fabee71b964ab000 100755 (executable)
@@ -180,6 +180,7 @@ fi
 
 skip $isroot "Root access is needed. Skipping all tests." $NUM_TESTS ||
 {
+       validate_lttng_modules_present
        trap signal_cleanup SIGTERM SIGINT
 
        while [ "$i" -lt "$TEST_COUNT" ]; do
index f3a393eb8ed4ffbac581bc0cd729ff754499cbb8..78f053fcd110c7b889f1e96e5be49e3b68eeafaf 100755 (executable)
@@ -81,6 +81,7 @@ fi
 
 skip $isroot "Root access is needed. Skipping all tests." $NUM_TESTS ||
 {
+       validate_lttng_modules_present
        start_lttng_sessiond
 
        test_event_basic
index c0e2f71b4085f2723cf9a88fe20a6787125b6ca8..5ada3db5a8ab448c67d587efa67ae35d329b52cf 100755 (executable)
@@ -118,6 +118,7 @@ fi
 
 skip $isroot "Root access is needed. Skipping all tests." $NUM_TESTS ||
 {
+       validate_lttng_modules_present
        start_lttng_sessiond
 
        test_proc_logger
index 1c5d15f02e113c8283393bcf62bdf8e7a7873d58..326eb25c46126eb9408895750645529b2bf45f3e 100755 (executable)
@@ -131,8 +131,22 @@ function test_ns()
                # Check that the events contain the right namespace inode number
                validate_trace_count "${ns}_ns = $app_ns_inode" "$trace_path" 1
                validate_trace_count "${ns}_ns = $app_unshare_ns_inode" "$trace_path" 1
+       else
+               touch "$file_sync_wait_before_unshare"
+
+               while [ ! -f "$file_sync_signal_after_unshare" ]; do
+                       # Break if the app failed / died
+                       if ! kill -0 "$app_pid" ; then
+                               break
+                               echo "# App failed"
+                       fi
+                       echo "# Waiting for app..."
+                       sleep 0.5
+               done
+               touch "$file_sync_wait_after_unshare"
        fi
 
+
        # stop and destroy
        destroy_lttng_session_ok "$session_name"
        stop_lttng_sessiond
@@ -174,3 +188,4 @@ test_ns net
 #test_ns pid # pid_ns is special, can't be changed that way
 test_ns user
 test_ns uts
+set +x
index 722468f5757aeb73f26b899ec2ee1582049ce09d..804b242742191274a6915122dff38355dfeb3d77 100755 (executable)
@@ -128,6 +128,7 @@ fi
 
 skip $isroot "Root access is needed. Skipping all tests." $NUM_TESTS ||
 {
+       validate_lttng_modules_present
        trap signal_cleanup SIGTERM SIGINT
 
        while [ "$i" -lt "$TEST_COUNT" ]; do
index 2aa4d6fe168fc13fe9ead63027a272f17d2792b5..563f47bf4941dc5e1984d662e17fa81d38bd9f22 100755 (executable)
@@ -370,6 +370,8 @@ fi
 
 skip $isroot "Root access is needed. Skipping all tests." $NUM_TESTS ||
 {
+       validate_lttng_modules_present
+
        start_lttng_sessiond
 
        test_working_cases
index 487ee668e2a583fef364044b753e64f86afb82e7..3c529cbc063f97b120eb654d66dc51cde4ae9c6c 100755 (executable)
@@ -583,6 +583,7 @@ fi
 
 skip $isroot "Root access is needed. Skipping all tests." $NUM_TESTS ||
 {
+       validate_lttng_modules_present
        start_lttng_sessiond
 
        test_syscall_event_list
index 9886f1e1561d6849b2bfee7dbb63e001776f7219..bbc3dd100ff5f756be7128de0ba0cde5f46e110f 100755 (executable)
@@ -822,6 +822,7 @@ fi
 
 skip $isroot "Root access is needed. Skipping all tests." $NUM_TESTS ||
 {
+       validate_lttng_modules_present
        start_lttng_sessiond
 
        # Unsuccessful event enabling
index 59f03440e713bc132238bd04620569acaaebbbdf..3d0868afbea39bfbddd9bd0d82292be4714de0ff 100644 (file)
@@ -1,28 +1 @@
-regression/kernel/test_all_events
-regression/kernel/test_channel
-regression/kernel/test_event_basic
-regression/kernel/test_syscall
-regression/kernel/test_clock_override
-regression/kernel/test_rotation_destroy_flush
-regression/kernel/test_select_poll_epoll
-regression/kernel/test_lttng_logger
-regression/kernel/test_callstack
-regression/kernel/test_userspace_probe
-regression/kernel/test_ns_contexts
-regression/kernel/test_ns_contexts_change
-regression/tools/live/test_kernel
-regression/tools/live/test_lttng_kernel
 regression/tools/streaming/test_high_throughput_limits
-regression/tools/streaming/test_kernel
-regression/tools/snapshots/test_kernel
-regression/tools/snapshots/test_kernel_streaming
-regression/tools/health/test_thread_ok
-regression/tools/filtering/test_invalid_filter
-regression/tools/filtering/test_unsupported_op
-regression/tools/filtering/test_valid_filter
-regression/tools/wildcard/test_event_wildcard
-regression/tools/regen-metadata/test_kernel
-regression/tools/regen-statedump/test_kernel
-regression/tools/notification/test_notification_kernel
-regression/tools/notification/test_notification_multi_app
-regression/ust/test_event_perf
This page took 0.030864 seconds and 4 git commands to generate.