[PATCH] test-link: work on Hurd

2011-03-01 Thread Eric Blake
* tests/test-link.h (test_link): Hurd rejects linking directories with EISDIR instead of the POSIX-mandated EPERM. Signed-off-by: Eric Blake --- I'll be reporting this to the Hurd folks, but in the meantime, we might as well work around it. This was the only testsuite failure for m4 1.4.16 on H

Re: copy-file.c vs ignoring chown's return value

2011-03-01 Thread Bruno Haible
Hi Jim, > * lib/copy-file.c: Include "ignore-value.h". > (copy_file_preserving): Ignore chown failure. > * modules/copy-file (Depends-on): Add ignore-value. Looks all fine, no objection. Thank you. > One is to add this pragma along with a comment somewhere in copy-file.c: > > # pragma GCC d

test-open.h on ia64

2011-03-01 Thread Simon Josefsson
This test fails on a debian buildd: /* /dev/null must exist, and be writable. */ fd = func ("/dev/null", O_RDONLY); ASSERT (0 <= fd); { char c; ASSERT (read (fd, &c, 1) == 0); Like this: test-open.h:58: assertion failed See https://buildd.debian.org/fetch.cgi?pkg=libidn;ver=1.

copy-file.c vs ignoring chown's return value

2011-03-01 Thread Jim Meyering
Hi Bruno, We're about to use the copy-file module in iwhd, and I'm seeing this warning/error with our gcc options: copy-file.c: In function 'copy_file_preserving': copy-file.c:120:9: error: ignoring return value of 'chown', declared with attribute warn_unused_result [-Wunused-result] I see

[PATCH 1/3] Add AF_UNIX test of socket familly

2011-03-01 Thread Bastien ROUCARIES
Test availability of AF_UNIX socket familly. It will be used by sendfd/receivefd. --- m4/afunix.m4 | 97 m4/sockpfaf.m4 | 23 +- 2 files changed, 119 insertions(+), 1 deletions(-) create mode 100644 m4/afunix.m4 diff --g

[PATCH 2/3] sendfd, recvf pass file descriptors along Unix domain sockets

2011-03-01 Thread Bastien ROUCARIES
Recvfd and sendfd can be used to pass an open file descriptor over a Unix domain socket from one process to another. --- lib/passfd.c | 145 lib/passfd.h | 21 modules/passfd | 28 +++ 3 files changed, 194 insertio

[PATCH 3/3] Add test for passfd

2011-03-01 Thread Bastien ROUCARIES
Add simple testing for passfd --- modules/passfd-tests | 11 + tests/test-passfd.c | 110 ++ 2 files changed, 121 insertions(+), 0 deletions(-) create mode 100644 modules/passfd-tests create mode 100644 tests/test-passfd.c diff --git a/mod

[V3] Passfd

2011-03-01 Thread Bastien ROUCARIES
This time corrected with a git commit mistake V3: correct git commit mistake V2: style change

[PATCH 2/3] sendfd, recvf pass file descriptors along Unix domain sockets

2011-03-01 Thread Bastien ROUCARIES
Recvfd and sendfd can be used to pass an open file descriptor over a Unix domain socket from one process to another. --- lib/passfd.c | 143 lib/passfd.h | 22 + modules/passfd | 28 +++ 3 files changed, 193 inserti

[PATCH 1/3] Add AF_UNIX test of socket familly

2011-03-01 Thread Bastien ROUCARIES
Test availability of AF_UNIX socket familly. It will be used by sendfd/receivefd. --- m4/afunix.m4 | 97 m4/sockpfaf.m4 | 23 +- 2 files changed, 119 insertions(+), 1 deletions(-) create mode 100644 m4/afunix.m4 diff --g

[PATCH 3/3] Add test for passfd

2011-03-01 Thread Bastien ROUCARIES
Add simple testing for passfd --- lib/passfd.c| 134 ++- lib/passfd.h|7 +-- tests/test-passfd.c | 108 + 3 files changed, 179 insertions(+), 70 deletions(-) create mode 100644 tests/test

[V2] Openat first step passfd api

2011-03-01 Thread Bastien ROUCARIES
Second try of the passfd api a la plan 9. Change since version 1: * use gnu style Please comments Bastien