[ovs-dev] [PATCH] testsuite: make tests match with the tested code
YAMAMOTO Takashi
yamt at mwd.biglobe.ne.jp
Fri Jul 5 10:25:47 UTC 2013
unix socket long path tests run if /proc/self/fd exists.
the tested code is included if linux.
these two conditions are not same. for example,
netbsd-6, which isn't linux, can have /proc/self/fd.
(well, i don't understand why this workaround uses procfs.
aren't temporary symlinks enough?)
Signed-off-by: YAMAMOTO Takashi <yamt at mwd.biglobe.ne.jp>
---
tests/library.at | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/library.at b/tests/library.at
index f84a55b..75bd073 100644
--- a/tests/library.at
+++ b/tests/library.at
@@ -133,7 +133,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 - C])
-AT_SKIP_IF([test ! -d /proc/self/fd])
+AT_SKIP_IF([test $(uname) != Linux])
dnl Linux has a 108 byte limit; this is 150 bytes long.
longname=012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
mkdir $longname
@@ -153,7 +153,7 @@ 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 - Python])
AT_SKIP_IF([test $HAVE_PYTHON = no])
-AT_SKIP_IF([test ! -d /proc/self/fd])
+AT_SKIP_IF([test $(uname) != Linux])
dnl Linux has a 108 byte limit; this is 150 bytes long.
longname=012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
mkdir $longname
--
1.8.1.5
More information about the dev
mailing list