tests: Place sockets in /tmp.
commit200d4c226e29ae4d67c002f06f7d33ef4d584a4d
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 12 Apr 2019 13:42:09 +0000 (12 14:42 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 12 Apr 2019 13:42:09 +0000 (12 14:42 +0100)
treed788d7efd9ae8b239af838313a9c724acbe710be
parent7f3fe7848a50d6c53283c92bc3cefbeefb0de923
tests: Place sockets in /tmp.

When compiling nbdkit inside a deep directory it is easy to exceed the
maximum length of a socket path.  You will see most tests failing with
errors like:

  nbdkit: -U option: path too long (max is 107) bytes

The awkward solution to this is to place all sockets in /tmp using
`mktemp -u` to create the name.  (There is a minor and not really
exploitable race here but it's easier than creating a directory for
every test.)
39 files changed:
tests/test-blocksize.sh
tests/test-cache-max-size.sh
tests/test-cache-on-read.sh
tests/test-cache.sh
tests/test-captive.sh
tests/test-cow.sh
tests/test-data-7E.sh
tests/test-data-base64.sh
tests/test-data-file.sh
tests/test-data-raw.sh
tests/test-error0.sh
tests/test-error10.sh
tests/test-error100.sh
tests/test-floppy.sh
tests/test-foreground.sh
tests/test-fua.sh
tests/test-full.sh
tests/test-iso.sh
tests/test-linuxdisk.sh
tests/test-log.sh
tests/test-memory-largest-for-qemu.sh
tests/test-memory-largest.sh
tests/test-nozero.sh
tests/test-offset2.sh
tests/test-parallel-nbd.sh
tests/test-partitioning2.sh
tests/test-partitioning3.sh
tests/test-partitioning5.sh
tests/test-pattern-largest-for-qemu.sh
tests/test-pattern-largest.sh
tests/test-pattern.sh
tests/test-shebang-perl.sh
tests/test-shebang-python.sh
tests/test-shebang-ruby.sh
tests/test-single.sh
tests/test-start.sh
tests/test-truncate1.sh
tests/test-truncate2.sh
tests/test-truncate3.sh