diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-10-04 04:09:11 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-10-04 04:09:11 -0400 |
commit | e9529270fe756b215a53166f30cde761d045bd47 (patch) | |
tree | b10f4b879ee90017759f419337334aee806ffa6d | |
parent | b3afdd50c4121a82a8de61dba1a7ad2d0bd8e901 (diff) |
test: common.bash: Shorten tmpdir
If /run/user/$UID/ doesn't exist, then the gpg-agent socket will be in
$GNUPGHOME, which is inside of $tmpdir. Because the $BATS_TEST_NAME is
embedded in $tmpdir, the path might be quite long, and hit the 108-byte
limit on socket paths, which GnuPG does nothing to check for or handle.
So, don't embed $BATS_TEST_NAME in $tmpdir, in order to keep the path
shorter.
-rw-r--r-- | test/lib/common.bash | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/common.bash b/test/lib/common.bash index 7663a9b..1a16ae0 100644 --- a/test/lib/common.bash +++ b/test/lib/common.bash @@ -8,7 +8,7 @@ fi # per-test setup/teardown ############################################ common_setup() { - tmpdir="$(mktemp -d --tmpdir "test-${BATS_TEST_NAME}.XXXXXXXXXXXX")" + tmpdir="$(mktemp -d --tmpdir test.XXXXXXXXXXXX)" chmod 755 "$tmpdir" status=0 |