From: Daiki Ueno Date: Thu, 3 May 2018 15:29:40 +0000 (+0200) Subject: test: Avoid exceeding maximum pathname length of Unix socket X-Git-Tag: 0.23.11~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b85c62af8146efa0e648a297179db2bbfe59b43;p=p11-kit test: Avoid exceeding maximum pathname length of Unix socket --- diff --git a/p11-kit/test-server.sh b/p11-kit/test-server.sh index e9455dc..e1d27ac 100755 --- a/p11-kit/test-server.sh +++ b/p11-kit/test-server.sh @@ -1,7 +1,12 @@ #!/bin/sh -testdir=$PWD/test-server-$$ -test -d "$testdir" || mkdir "$testdir" +set -e + +testdir=`mktemp -d -t test-server.XXXXXX` +if test $? -ne 0; then + echo "cannot create temporary directory" >&2 + exit 77 +fi cleanup () { rm -rf "$testdir"