mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
perf test: Add 30s timeout for wait for daemon start.
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> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lore.kernel.org/lkml/20210317005505.2794804-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
078cbb6f75
commit
a6cb06ff49
1 changed files with 7 additions and 0 deletions
|
@ -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 "FAILED: Timeout waiting for daemon to ping"
|
||||
daemon_exit ${config}
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue