History

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.

Ian Rogers committed 5 years ago

Commit a6cb06f1 parent 078cbb61 file · +7 −0Browse files

Unified · Split

tools/perf/tests/shell/daemon.sh+7−0
@@ -127,9 +127,16 @@ daemon_start() · 126 unmodified lines
127127
128128 # wait for the session to ping
129129 local state="FAIL"
130+ local retries=0
130131 while [ "${state}" != "OK" ]; do
131132 state=`perf daemon ping --config ${config} --session ${session} | awk '{ print $1 }'`
132133 sleep 0.05
134+ retries=$((${retries} +1))
135+ if [ ${retries} -ge 600 ]; then
136+ echo "FAILED: Timeout waiting for daemon to ping"
137+ daemon_exit ${config}
138+ exit 1
139+ fi
133140 done
134141 }
135142

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t