Does this mean that NetBSD's /proc/self/fd does not work for opening files?

Temporary symbolic links would require more code (especially to make sure
that they get deleted if the process is killed). We could do that; feel
free to submit an implementation.

A better solution would be, instead of testing uname, to test whether proc
works in the required way. That could be done from configure and tested
both from C and from the test suite.
On Jul 5, 2013 6:26 AM, "YAMAMOTO Takashi" <y...@mwd.biglobe.ne.jp> wrote:

> 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 <y...@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
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to