Skip to content

Commit

Permalink
test: Avoid exceeding maximum pathname length of Unix socket
Browse files Browse the repository at this point in the history
  • Loading branch information
ueno committed May 3, 2018
1 parent a625dfa commit 6b6c9b4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions p11-kit/test-server.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 6b6c9b4

Please sign in to comment.