Motivation
==========
Using the rough duration of the tests 'Wait after kill \w+ daemon',
approximately 200s were being spent in those areas when running
non-root, non-destructive tests on my development machine.
```
$ find . -iname '*.log' -exec grep -A4 -HE 'Wait for kill [a-z]+ daemon'
{} \; | grep duration_ms | cut -d':' -f2 | datamash sum 1
198078.707216
```
Solution
========
The `stop_x_opt()` functions with timers in `tests/utils/utils.sh`
have the timeouts multiplied by 5 to reduce the counted sleep interval
to 0.1s.
After applying this change, the time spent in the tests as counted
with the find command in the 'Motivation' section above was reduced to
92061.768ms, a reduction of about 1.5 minutes.
Known drawbacks
===============
None
Change-Id: I1d4ad899808f37f6cb7b88bbab0ff05ab0c2b787
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
# Multiply time by 2 to simplify integer arithmetic
# Multiply time by 2 to simplify integer arithmetic
+ # Multiply time by 5 to adjust for sleeping every 0.1s
if [ -n "$timeout_s" ]; then
if [ -n "$timeout_s" ]; then
- dtimeleft_s=$((timeout_s * 2))
+ dtimeleft_s=$((timeout_s * 2 * 5))
fi
dtimeleft_s=$((dtimeleft_s - 1))
fi
fi
dtimeleft_s=$((dtimeleft_s - 1))
fi
done
if [ "$withtap" -eq "1" ]; then
if [ "$retval" -eq "0" ]; then
done
if [ "$withtap" -eq "1" ]; then
if [ "$retval" -eq "0" ]; then
fi
# Multiply time by 2 to simplify integer arithmetic
fi
# Multiply time by 2 to simplify integer arithmetic
+ # Multiply time by 5 to adjust for sleeping every 0.1s
if [ -n "$timeout_s" ]; then
if [ -n "$timeout_s" ]; then
- dtimeleft_s=$((timeout_s * 2))
+ dtimeleft_s=$((timeout_s * 2 * 5))
fi
if [ -n "$TEST_NO_SESSIOND" ] && [ "$TEST_NO_SESSIOND" == "1" ]; then
fi
if [ -n "$TEST_NO_SESSIOND" ] && [ "$TEST_NO_SESSIOND" == "1" ]; then
fi
dtimeleft_s=$((dtimeleft_s - 1))
fi
fi
dtimeleft_s=$((dtimeleft_s - 1))
fi
done
out=1
while [ -n "$out" ]; do
done
out=1
while [ -n "$out" ]; do
fi
dtimeleft_s=$((dtimeleft_s - 1))
fi
fi
dtimeleft_s=$((dtimeleft_s - 1))
fi
done
if [ "$withtap" -eq "1" ]; then
done
if [ "$withtap" -eq "1" ]; then
fi
# Multiply time by 2 to simplify integer arithmetic
fi
# Multiply time by 2 to simplify integer arithmetic
+ # Multiply time by 5 to adjust for sleeping every 0.1s
if [ -n "$timeout_s" ]; then
if [ -n "$timeout_s" ]; then
- dtimeleft_s=$((timeout_s * 2))
+ dtimeleft_s=$((timeout_s * 2 * 5))
fi
pids="$(lttng_pgrep "$CONSUMERD_MATCH")"
fi
pids="$(lttng_pgrep "$CONSUMERD_MATCH")"
fi
dtimeleft_s=$((dtimeleft_s - 1))
fi
fi
dtimeleft_s=$((dtimeleft_s - 1))
fi
done
if [ "$withtap" -eq "1" ]; then
if [ "$retval" -eq "0" ]; then
done
if [ "$withtap" -eq "1" ]; then
if [ "$retval" -eq "0" ]; then