summaryrefslogtreecommitdiff
path: root/tests/test-passfd.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* passfd: give nicer error for recvfd at eofEric Blake2013-12-241-0/+8
| | | | | | | | | | | | | I noticed that recvfd() fails with errno set to EACCES if the other end of the socket has closed (such as if it calls _exit()); but "Permission denied" as the strerror() message doesn't read very well. This improves things to give the nicer message: "Transport endpoint is not connected". * lib/passfd.c (recvfd): Fake ENOTCONN if other end closes early. * tests/test-passfd.c (main): Enhance test to cover this. Signed-off-by: Eric Blake <eblake@redhat.com>
* tests: make it easier to bypass alarm time in debuggerEric Blake2013-03-111-1/+2
| | | | | | | | | | | | | | | | While auditing alarm usage, I noticed that test-regex had a nice idiom that made it easier to disable an alarm under glibc. Use it elsewhere, so future copy-and-paste will preserve the idiom. * tests/test-file-has-acl.c (main): Allow gdb to override alarm. * tests/test-memmem.c (main): Likewise. * tests/test-passfd.c (main): Likewise. * tests/test-ptsname.c (main): Likewise. * tests/test-ptsname_r.c (main): Likewise. * tests/test-strcasestr.c (main): Likewise. * tests/test-strstr.c (main): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* passfd: allow compilation on mingwEric Blake2011-04-211-2/+17
| | | | | | | | | | | | | | | | | | | | | | The passfd module now skips on mingw, rather than failing to compile. It may be nice to add a sendmsg and recvmsg module in the future, but for now passfd is the only client that cares. * modules/sys_socket (Depends-on): Add sys_uio. * lib/sys_socket.in.h [!@HAVE_SYS_SOCKET_H@]: Use it for struct iovec and a minimal struct msghdr. * tests/test-sys_socket.c (main): Enhance test. * m4/afunix.m4 (gl_SOCKET_AFUNIX): Detect recvmsg/sendmsg. * lib/passfd.c (include): Drop <sys/uio.h>; <sys/sockets.h> is guaranteed to provide what we need. (sendmsg, recvmsg): Declare fallbacks if we lack sendmsg. * modules/passfd-tests (Depends-on): Add sys_wait. * tests/test-passfd.c (main): Skip test on mingw, for now. * doc/posix-headers/sys_socket.texi (sys/socket.h): Document the partial 'struct msghdr' implementation. Signed-off-by: Eric Blake <eblake@redhat.com>
* passfd: fix incorrect sendmsg argumentsEric Blake2011-03-301-0/+7
| | | | | | | | | | | | The unit test hung on NetBSD, which pointed out a couple of bugs. * lib/passfd.c (sendfd): Avoid uninitialized msg_flags field, and incorrect msg_controllen value. * modules/passfd-tests (Depends-on): Check for alarm. * tests/test-passfd.c (main) [HAVE_DECL_ALARM]: Avoid hanging test. Reported by Bastien ROUCARIES. Signed-off-by: Eric Blake <eblake@redhat.com>
* passfd test: Fix warnings.Bruno Haible2011-03-131-4/+4
| | | | | * tests/test-passfd.c: Include <sys/wait.h>. (main): Fix typo.
* passfd module, part 4, tweaks.Bruno Haible2011-03-131-12/+11
| | | | | * tests/test-passfd.c: Reorder includes. (main): Fix perror and printf calls.
* passfd module, part 4.Bastien Roucariès2011-03-131-0/+112
* modules/passfd-tests: New file. * tests/test-passfd.c: New file.