summaryrefslogtreecommitdiff
path: root/tests/library.at
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2013-01-16 09:22:06 -0800
committerBen Pfaff <blp@nicira.com>2013-02-13 11:20:36 -0800
commitcd5abc65e9750f6c6b91c9fd3fcf2fb87cfdd1fb (patch)
tree92c4316a04e1b443eb4b0ec23ed07f31d7c24355 /tests/library.at
parentffaef958e473be1788a108bce85729fea9347ecf (diff)
downloadopenvswitch-cd5abc65e9750f6c6b91c9fd3fcf2fb87cfdd1fb.tar.gz
tests: Make test for Linux /proc/self/fd more straightforward.
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>
Diffstat (limited to 'tests/library.at')
-rw-r--r--tests/library.at12
1 files changed, 1 insertions, 11 deletions
diff --git a/tests/library.at b/tests/library.at
index 55adcfbf2..d8280fd15 100644
--- a/tests/library.at
+++ b/tests/library.at
@@ -124,17 +124,7 @@ dnl is about 100 bytes. On Linux, we work around this by indirecting through
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