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 21:46:10 +0000 (16:46 -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 222635d339d65e434ffe3eab642cc0fa374080d3..566bdeaf14443fcabcaa6652ad64f8fb4c2c6c6a 100644 (file)
@@ -98,6 +98,19 @@ endif # TEST_JAVA_LOG4J2_AGENT
 
 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 ad506b5534f603e67153d1d7a28fd3cc3bd0512f..9e554bbc0d538859ac1bf94d8d0174292210b733 100755 (executable)
@@ -144,6 +144,7 @@ fi
 
 skip $isroot "Root access is needed. Skipping all tests." "$NUM_TESTS" ||
 {
+       validate_lttng_modules_present
        start_lttng_sessiond
 
        if test $RUN_USERSPACE_TEST == 1; then
index 9dcde73d821e2939ddb2efcf39370b71becca5af..8f471def8b6053da7b4713f99233f03d0cccc90e 100755 (executable)
@@ -182,6 +182,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.029757 seconds and 4 git commands to generate.