lkml.org 
[lkml]   [2021]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] perf test: Add 30s timeout for wait for daemon start.
On Wed, Mar 10, 2021 at 12:41:18PM -0800, Ian Rogers wrote:
> Retry the ping loop upto 600 times, or approximately 30 seconds, to make
> sure the test does hang at start up.
>
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/perf/tests/shell/daemon.sh | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tools/perf/tests/shell/daemon.sh b/tools/perf/tests/shell/daemon.sh
> index a02cedc76de6..cb831ff2c185 100755
> --- a/tools/perf/tests/shell/daemon.sh
> +++ b/tools/perf/tests/shell/daemon.sh
> @@ -127,9 +127,16 @@ daemon_start()
>
> # wait for the session to ping
> local state="FAIL"
> + local retries=0
> while [ "${state}" != "OK" ]; do
> state=`perf daemon ping --config ${config} --session ${session} | awk '{ print $1 }'`
> sleep 0.05
> + retries=$((${retries} +1))
> + if [ ${retries} -ge 600 ]; then
> + echo "Timeout waiting for daemon to ping"
> + daemon_exit ${config}
> + exit 62
> + fi

so it broke in here for you? ;-) makes sense, please keep
the 'FAILED: ...' prefix so it's obvious it's an error

thanks,
jirka

> done
> }
>
> --
> 2.30.1.766.gb4fecdf3b7-goog
>

\
 
 \ /
  Last update: 2021-03-11 11:39    [W:0.076 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site