summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/scripts/common.sh7
-rwxr-xr-xtests/suite/tls-fuzzer/tls-fuzzer-cert.sh3
-rwxr-xr-xtests/suite/tls-fuzzer/tls-fuzzer-nocert.sh3
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/scripts/common.sh b/tests/scripts/common.sh
index 485197a291..8c0e1e920f 100644
--- a/tests/scripts/common.sh
+++ b/tests/scripts/common.sh
@@ -164,3 +164,10 @@ wait_udp_server() {
sleep 4
}
+if test -x /usr/bin/lockfile-create;then
+LOCKFILE="lockfile-create global"
+UNLOCKFILE="lockfile-remove global"
+else
+LOCKFILE="lockfile global.lock"
+UNLOCKFILE="rm -f global.lock"
+fi
diff --git a/tests/suite/tls-fuzzer/tls-fuzzer-cert.sh b/tests/suite/tls-fuzzer/tls-fuzzer-cert.sh
index ac942f3e6c..ad068b5ead 100755
--- a/tests/suite/tls-fuzzer/tls-fuzzer-cert.sh
+++ b/tests/suite/tls-fuzzer/tls-fuzzer-cert.sh
@@ -31,6 +31,8 @@ TMPFILE=tls-fuzzer-cert.$$.tmp
#eval "${GETPORT}"
PORT=4433
+$LOCKFILE
+
pushd tls-fuzzer
if ! test -d tlsfuzzer;then
@@ -65,4 +67,5 @@ rm -f ${TMPFILE}
popd
+$UNLOCKFILE
exit $retval
diff --git a/tests/suite/tls-fuzzer/tls-fuzzer-nocert.sh b/tests/suite/tls-fuzzer/tls-fuzzer-nocert.sh
index ea19ffcd1f..6459fbf4df 100755
--- a/tests/suite/tls-fuzzer/tls-fuzzer-nocert.sh
+++ b/tests/suite/tls-fuzzer/tls-fuzzer-nocert.sh
@@ -31,6 +31,8 @@ TMPFILE=tls-fuzzer.$$.tmp
#eval "${GETPORT}"
PORT=4433
+$LOCKFILE
+
pushd tls-fuzzer
if ! test -d tlsfuzzer;then
@@ -65,4 +67,5 @@ rm -f ${TMPFILE}
popd
+$UNLOCKFILE
exit $retval