Skip to content

Commit fb5eda2

Browse files
committed
- need to add typeset for i (forloop counter), there is a risk the global state gets polluted. missing typeset in generate_download_files() prevents haproxy to build
1 parent e7cff9e commit fb5eda2

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

bench-scripts/apache_bench.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,7 @@ function run_test {
922922
}
923923

924924
function setup_tests {
925+
typeset i=0
925926
install_openssl master
926927
install_siege openssl-master
927928
install_apache openssl-master
@@ -1008,6 +1009,7 @@ function setup_tests {
10081009
function run_tests {
10091010
typeset SAVE_RESULT_DIR="${RESULT_DIR}"
10101011
typeset HAPROXY_OPTIONS=('no' 'client' 'server' 'both')
1012+
typeset i=""
10111013

10121014
for i in event worker pre-fork ; do
10131015
mkdir -p ${RESULT_DIR}/$i || exit 1

bench-scripts/common_util.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ function cleanup {
9292

9393
function clean_build {
9494
typeset SAVE_DIR=`pwd`
95+
typeset i=""
9596
cd "${WORKSPACE_ROOT}"
9697
for i in * ; do
9798
if [[ -d $i ]] ; then
@@ -309,6 +310,7 @@ function plot_results {
309310

310311
function generate_download_files {
311312
typeset HTDOCS=$1
313+
typeset i=""
312314

313315
mkdir -p ${HTDOCS} || exit 1
314316

bench-scripts/haproxy_bench.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ HOST=${BENCH_HOST:-'127.0.0.1'}
2424
HAPROXY_VERSION='v3.2.0'
2525

2626
function install_haproxy {
27-
typeset SSL_LIB=$1
28-
typeset VERSION=${HAPROXY_VERSION:-v3.2.0}
27+
typeset SSL_LIB=$1
28+
typeset VERSION=${HAPROXY_VERSION:-v3.2.0}
2929
typeset HAPROXY_REPO="https://github.com/haproxy/haproxy.git"
3030
typeset BASENAME='haproxy'
3131
typeset DIRNAME="${BASENAME}-${VERSION}"
3232
typeset CERTDIR="${INSTALL_ROOT}/${SSL_LIB}/conf/certs"
3333

34-
if [[ -z "${SSL_LIB}" ]] ; then
34+
if [[ -z "${SSL_LIB}" ]] ; then
3535
SSL_LIB="openssl-master"
36-
fi
36+
fi
3737

3838
if [[ -f "${INSTALL_ROOT}/${SSL_LIB}/sbin/haproxy" ]] ; then
3939
echo "haproxy already installed; skipping.."
@@ -44,6 +44,7 @@ function install_haproxy {
4444
git clone "${HAPROXY_REPO}" -b ${VERSION} --depth 1 . || exit 1
4545

4646
# haproxy does not have a configure script; only a big makefile
47+
make clean
4748
make ${MAKE_OPTS} \
4849
TARGET=generic \
4950
USE_OPENSSL=1 \

0 commit comments

Comments
 (0)