From ba8cb1bc592fba7b68d32dcac1651f735e1d7a26 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Wed, 29 Jan 2025 15:57:11 -0500 Subject: [PATCH] tests: Skip `test_tracefile_count_limit` when initial taskset fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Ia4c30f6eb3d7f07ee6e7fa62c8752b4967cf04b8 Signed-off-by: Kienan Stewart Signed-off-by: Jérémie Galarneau --- .../tracefile-limits/test_tracefile_count | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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" -- 2.39.5