tests: Reduce sleep in regression/tools/clear/test_ust
authorKienan Stewart <kstewart@efficios.com>
Thu, 31 Aug 2023 17:23:12 +0000 (13:23 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 21 Dec 2023 21:38:35 +0000 (16:38 -0500)
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 <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ibe6c37d474edf5ca118c82669e073089d888ff84

tests/regression/tools/clear/test_ust
tests/utils/utils.sh

index 27af7becac06987a5eb149494ade2cbb167f497d..a73c80af229e50cc78523322dc2b8c3ace9aaef4 100755 (executable)
@@ -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.
index 291cb578a98fdfd27d12a0944216ba255a511934..5bab2f372eeccc64ccb774bfd4806fe0dbb37f11 100644 (file)
@@ -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"
 }
This page took 0.027511 seconds and 4 git commands to generate.