EXAMPLES: opentracing: refined shell scripts for testing filter performance
When calling the 'basename' command, the argument ${0} is enclosed in
quotation marks. This is necessary if the path of the executable script
(contained in that argument) has "non-standard" elements, such as space
and the like.
Also, in the script 'test-speed.sh' the function sh_exit() has been added
for easier printing of messages at the end of execution.
This patch must be backported as far as 2.4.
diff --git a/addons/ot/test/run-ctx.sh b/addons/ot/test/run-ctx.sh
index 064fa7d..bfac617 100755
--- a/addons/ot/test/run-ctx.sh
+++ b/addons/ot/test/run-ctx.sh
@@ -3,7 +3,7 @@
_ARG_HAPROXY="${1:-$(realpath -L ${PWD}/../../../haproxy)}"
_ARGS="-f ctx/haproxy.cfg"
_LOG_DIR="_logs"
- _LOG="${_LOG_DIR}/_log-$(basename ${0} .sh)-$(date +%s)"
+ _LOG="${_LOG_DIR}/_log-$(basename "${0}" .sh)-$(date +%s)"
test -x "${_ARG_HAPROXY}" || exit 1