From 59f1283e0e6712195898a93ce8d6e220285fbd1b Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Tue, 11 Oct 2016 20:10:37 +0200 Subject: tests: crl-test: use a unique temp file --- tests/suite/crl-test | 9 +++++---- 1 file 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 -- cgit v1.2.1