From 1b85c62af8146efa0e648a297179db2bbfe59b43 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Thu, 3 May 2018 17:29:40 +0200 Subject: [PATCH] test: Avoid exceeding maximum pathname length of Unix socket --- p11-kit/test-server.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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" -- 2.40.0