From: Kienan Stewart Date: Wed, 29 Jan 2025 20:57:11 +0000 (-0500) Subject: tests: Skip `test_tracefile_count_limit` when initial taskset fails X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=ba8cb1bc592fba7b68d32dcac1651f735e1d7a26;p=lttng-tools.git tests: Skip `test_tracefile_count_limit` when initial taskset fails Change-Id: Ia4c30f6eb3d7f07ee6e7fa62c8752b4967cf04b8 Signed-off-by: Kienan Stewart Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/tools/tracefile-limits/test_tracefile_count b/tests/regression/tools/tracefile-limits/test_tracefile_count index e3dbdd4c5..c5be76212 100755 --- a/tests/regression/tools/tracefile-limits/test_tracefile_count +++ b/tests/regression/tools/tracefile-limits/test_tracefile_count @@ -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"