summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2016-10-11 20:10:37 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2016-10-14 22:55:38 +0200
commit59f1283e0e6712195898a93ce8d6e220285fbd1b (patch)
tree40e83b9e476b9218ccddae34689365f9fa179249 /tests
parentc2f5c041cba0cafdf3a554a5fe8445ce16eeb562 (diff)
downloadgnutls-59f1283e0e6712195898a93ce8d6e220285fbd1b.tar.gz
tests: crl-test: use a unique temp file
Diffstat (limited to 'tests')
-rwxr-xr-xtests/suite/crl-test9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/suite/crl-test b/tests/suite/crl-test
index 48fd5ec516..a2b544c2a0 100755
--- a/tests/suite/crl-test
+++ b/tests/suite/crl-test
@@ -26,9 +26,10 @@ CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
if ! test -z "${VALGRIND}"; then
VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}"
fi
+TMPFILE=long.$$.pem.tmp
-rm -f tmp-long.pem
-${VALGRIND} "${CERTTOOL}" --crl-info --inder --infile "${srcdir}/crl/long.crl" --outfile tmp-long.pem
+rm -f $TMPFILE
+${VALGRIND} "${CERTTOOL}" --crl-info --inder --infile "${srcdir}/crl/long.crl" --outfile $TMPFILE
rc=$?
# We're done.
@@ -37,7 +38,7 @@ if test "${rc}" != "0"; then
exit ${rc}
fi
-${DIFF} "${srcdir}/crl/long.pem" "tmp-long.pem" || ${DIFF} --strip-trailing-cr "${srcdir}/crl/long.pem" tmp-long.pem
+${DIFF} "${srcdir}/crl/long.pem" "$TMPFILE" || ${DIFF} --strip-trailing-cr "${srcdir}/crl/long.pem" $TMPFILE
rc=$?
if test "${rc}" != "0"; then
@@ -45,6 +46,6 @@ if test "${rc}" != "0"; then
exit ${rc}
fi
-rm -f tmp-long.pem
+rm -f $TMPFILE
exit 0