Presumably we can test for this Linux feature just by seeing whether the
directory is there.
Another goal is to shorten the code because I intend to make another copy
of it in an upcoming commit, to add a similar test for Python.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
dnl a directory fd using /proc/self/fd/<dirfd>. We do not have a workaround
dnl for other platforms, so we skip the test there.
AT_SETUP([test unix socket -- long pathname])
-AT_CHECK([dnl
- case `uname` in dnl (
- *[[lL]]inux*)
- exit 0
- ;; dnl (
- *)
- dnl Magic exit code to tell Autotest to skip this test.
- exit 77
- ;;
- esac
-])
+AT_SKIP_IF([test ! -d /proc/self/fd])
dnl Linux has a 108 byte limit; this is 150 bytes long.
mkdir 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
cd 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789