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>
Tue, 22 Feb 2022 21:49:37 +0000 (16:49 -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.

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

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 dac6f84e6ca192f533ebd736c018c04975d53f05..74a4c48f148067c7e205b83a89e99c2e20e51a37 100644 (file)
@@ -81,6 +81,19 @@ TESTS += ust/before-after/test_before_after \
 
 if IS_LINUX
 TESTS += \
+       kernel/test_all_events \
+       kernel/test_callstack \
+       kernel/test_channel \
+       kernel/test_clock_override \
+       kernel/test_event_basic \
+       kernel/test_kernel_function \
+       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 \
        ust/namespaces/test_ns_contexts \
        ust/namespaces/test_ns_contexts_change
 endif # IS_LINUX
index 75b045c9dac04bd6417d18913111881967ad649c..2e20888df3590e26c7d2298e3d5f703799497325 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 b5759d442d1670f158e01ec4603eca4a884cd13a..a4477fd7c81d08f2b977e21f3a3f0cb056d074ca 100755 (executable)
@@ -142,18 +142,13 @@ fi
 
 skip $isroot "Root access is needed. Skipping all tests." "$NUM_TESTS" ||
 {
-       which "$BABELTRACE_BIN" > /dev/null
-       test $? -ne 0
-       skip $? "Babeltrace binary not found. Skipping callstack tests" "$NUM_TESTS" ||
-       {
-               start_lttng_sessiond
+       validate_lttng_modules_present
+       start_lttng_sessiond
 
-               if test $RUN_USERSPACE_TEST == 1; then
-                       test_user_callstack
-               fi
+       if test $RUN_USERSPACE_TEST == 1; then
+               test_user_callstack
+       fi
 
-               test_kernel_callstack
-
-               stop_lttng_sessiond
-       }
+       test_kernel_callstack
+       stop_lttng_sessiond
 }
index cef30dc30dd048c9ccf001343b413049c4966630..dfe8894ac017ced05a33218d1fa8e528efa96b52 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 c2500c69db27c5e0766ec436fa9f4fd14b915f4c..ac9ec05492cf2462f422af01b2fd19e2710dfc5b 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 9fa8ca33f30aa2095b931b575aaa376f226c8bd9..b8f7ded82364cf82e5bc64ad61ae97a5585ada2c 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 e32a75b8a3e86f8473d9f99527577f5e7ec9a260..42a61276be2222f0ef9e4c2ef61131be8a1018b2 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
@@ -175,3 +189,4 @@ test_ns net
 #test_ns time # time_ns is special, can't be changed that way
 test_ns user
 test_ns uts
+set +x
index 57434b0a5650eb1cb0b7adf90ab264ff2a2480b9..cb773d7df59973c4a31ca69e6332cda9601f46f1 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 6d5509b25990ea7960e39803cc07b2c54e6b7290..17e7dd4db10778b49c108b5c9003a55f5023615f 100755 (executable)
@@ -381,6 +381,8 @@ fi
 
 skip $isroot "Root access is needed. Skipping all tests." $NUM_TESTS ||
 {
+       validate_lttng_modules_present
+
        start_lttng_sessiond
 
        test_working_cases
index b193dfb888f441b48f3a92736eb1684e3ef385a4..401a18a8de4932b141abf9e87d6b98f9b390458e 100755 (executable)
@@ -672,6 +672,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 0efcb9165d338f957f8eb370ac01114de520305e..31b11e98da99777b25e3f4079c1edeab12e636bc 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 894e8dcbf434d3bad576a179b3118ef75906dc37..3d0868afbea39bfbddd9bd0d82292be4714de0ff 100644 (file)
@@ -1,27 +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_multi_app
-regression/ust/test_event_perf
This page took 0.0299160000000001 seconds and 4 git commands to generate.