From fd6ecee841f0fd100c01975f1facb2c5406f9df5 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Thu, 31 Aug 2023 13:23:12 -0400 Subject: [PATCH] tests: Reduce sleep in regression/tools/clear/test_ust MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Motivation ========== This test is one of the longer running non-kernel non-destructive tests, taking ~7 minutes to run in my development environment. Solution ======== By reducing the the sleeps from a half second to a tenth of a second, the test passes from 364.0s to 309.1s. Known drawbacks =============== None Signed-off-by: Kienan Stewart Signed-off-by: Jérémie Galarneau Change-Id: Ibe6c37d474edf5ca118c82669e073089d888ff84 --- tests/regression/tools/clear/test_ust | 10 +++++----- tests/utils/utils.sh | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/regression/tools/clear/test_ust b/tests/regression/tools/clear/test_ust index 27af7beca..a73c80af2 100755 --- a/tests/regression/tools/clear/test_ust +++ b/tests/regression/tools/clear/test_ust @@ -270,7 +270,7 @@ function test_ust_basic_streaming_live_viewer () local evcount=0 while [ $evcount -ne 10 ]; do evcount=$(cat $bt_output_path | wc -l) - sleep 0.5 + sleep 0.1 done pass "Live viewer read $evcount events, expect 10" @@ -370,7 +370,7 @@ function test_ust_streaming_live_viewer_new_metadata_after_clear () local evcount=0 while [ $evcount -ne 10 ]; do evcount=$(wc -l < "$bt_output_path") - sleep 0.5 + sleep 0.1 done pass "Live viewer read $evcount events, expect 10" @@ -389,7 +389,7 @@ function test_ust_streaming_live_viewer_new_metadata_after_clear () local evcount=0 while [ $evcount -ne 12 ]; do evcount=$(wc -l < "$bt_output_path") - sleep 0.5 + sleep 0.1 done pass "Live viewer read $evcount events, expect 12" @@ -641,7 +641,7 @@ function test_ust_local_snapshot_per_pid () # Continue only when there is only the last event remaining. while [ ! -f "${file_sync_before_last_touch}" ]; do - sleep 0.5 + sleep 0.1 done # Take a first snapshot and validate that the events are present. @@ -671,7 +671,7 @@ function test_ust_local_snapshot_per_pid () # Wait for the before exit sync point. This ensure that we went over the # last tracepoint. while [ ! -f "${file_sync_before_exit_touch}" ]; do - sleep 0.5 + sleep 0.1 done # Make sure the snapshot contains the last event. diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 291cb578a..5bab2f372 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -1995,7 +1995,7 @@ function wait_live_trace_ready () diag "Waiting for live trace at url: $url" while [ $zero_client_match -eq 0 ]; do zero_client_match=$($BABELTRACE_BIN -i lttng-live $url | grep "0 client(s) connected" | wc -l) - sleep 0.5 + sleep 0.1 done pass "Waiting for live trace at url: $url" } @@ -2008,7 +2008,7 @@ function wait_live_viewer_connect () diag "Waiting for live viewers on url: $url" while [ $one_client_match -eq 0 ]; do one_client_match=$($BABELTRACE_BIN -i lttng-live $url | grep "1 client(s) connected" | wc -l) - sleep 0.5 + sleep 0.1 done pass "Waiting for live viewers on url: $url" } -- 2.34.1