]> git.lttng.org Git - lttng-tools.git/commitdiff
tests: Skip `test_tracefile_count_limit` when initial taskset fails
authorKienan Stewart <kstewart@efficios.com>
Wed, 29 Jan 2025 20:57:11 +0000 (15:57 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 21 Feb 2025 16:17:32 +0000 (16:17 +0000)
Change-Id: Ia4c30f6eb3d7f07ee6e7fa62c8752b4967cf04b8
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/tools/tracefile-limits/test_tracefile_count

index e3dbdd4c57b796a2ebcc1a75c925f33e301a9be2..c5be7621287289352f3b4b72478d99798f266c46 100755 (executable)
@@ -123,7 +123,23 @@ function test_tracefile_count_limit ()
        # in stream size.
        while [ "$stream_size" -ne "$previous_stream_size" ]; do
                start_lttng_tracing_notap "$session_name"
-               taskset -c "$cpuno" "$TESTAPP_BIN" -i "$num_iter" >/dev/null 2>&1
+               if ! taskset -c "$cpuno" "$TESTAPP_BIN" -i "$num_iter" >/dev/null 2>&1 ; then
+                       diag "Taskset failed for CPU ${cpuno}"
+                       # This is a case that can happen in the CI cluster which has the CPU
+                       # affinities of containers changed at runtime when other colocated
+                       # containers are started or stopped and the cluster manager attempts
+                       # to rebalance the load across the host's physical resources.
+                       #
+                       # When this is the first iteration, skip the remaining tests as
+                       # most likely all future calls to taskset with this cpu will fail.
+                       if [[ "${previous_stream_size}" == "-1" ]]; then
+                               stop_lttng_tracing_notap "${session_name}"
+                               destroy_lttng_session_ok "${session_name}"
+                               skip 0 "Taskset failed on first iteration" 5
+                               rm -rf "${trace_path}"
+                               return
+                       fi
+               fi
                stop_lttng_tracing_notap "$session_name"
 
                previous_stream_size="$stream_size"
This page took 0.029625 seconds and 4 git commands to generate.