summaryrefslogtreecommitdiff
path: root/test-suite/tests/00-socket.test
Commit message (Collapse)AuthorAgeFilesLines
* Allow null bytes in UNIX sockets.Liliana Marie Prikler2022-06-161-4/+75
| | | | | | | | | | | | | | | | | | | | | | The current socket address constructors all assume, that there are no null bytes in the socket path. This assumption does not hold in Linux, which uses an initial null byte to demarcate abstract sockets and ignores all further null bytes [1]. [1] https://www.man7.org/linux/man-pages/man7/unix.7.html * libguile/sockets.c (scm_fill_sockaddr)[HAVE_UNIX_DOMAIN_SOCKETS]: Use scm_to_locale_stringn to construct c_address. Use memcpy instead of strcpy and calculate size directly instead of using SUN_LEN. (_scm_from_sockaddr): Copy the entire path up to the limits imposed by addr_size. * test-suite/tests/00-socket.test: ("make-socket-address"): Add case for abstract unix sockets. ("AF_UNIX/SOCK_STREAM"): Add abstract socket versions of bind, listen, connect and accept. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* socket test should not throw unresolved outside of a testMike Gran2021-01-231-2/+4
| | | | * test-suite/tests/00-socket.test: don't throw at top level
* add test for setsockoptMichael Gran2021-01-231-0/+11
| | | | * test-suite/tests/00-socket.test (setsockopt AF_INET): new test
* socket test should not throw unresolved outside of a testMichael Gran2021-01-211-18/+19
| | | | | * test-suite/tests/00-socket.test: don't throw unresolved outside of a test
* for socket test, don't presume TMP is usableMichael Gran2021-01-211-2/+2
| | | | | * test-suite/tests/00-socket.test: don't abort when unable to change into tmpdir
* Only run tests that require fork if it is providedMichael Gran2017-04-041-4/+8
| | | | | | | * test-suite/tests/00-repl-server.test (call-with-repl-server): throw if no fork provided * test-suite/tests/00-socket.test (primitive-fork-if-available): new help procedure (bind/sockaddr, AF_UNIX/SOCK_STREAM): use helper func * test-suite/tests/ports.test ("pipe, fdopen, and line buffering"): throw if no fork provided
* Merge commit 'b9b88351ea2c4b43a6f90938554dc5693b17e328'Andy Wingo2014-02-081-43/+1
|\ | | | | | | | | | | Conflicts: libguile/deprecated.h test-suite/tests/00-socket.test
| * Deprecate htons, htonl, ntohs, ntohlAndy Wingo2014-02-081-43/+1
| | | | | | | | | | | | | | | | | | | | | | * libguile/sockets.h: * libguile/sockets.c: * libguile/deprecated.h: * libguile/deprecated.c (scm_htons, scm_htonl, scm_ntohs, scm_ntohl): Deprecate. Bytevectors adequately subsume their functionality. * doc/ref/posix.texi: * test-suite/tests/00-socket.test: Update.
* | Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver2013-04-141-1/+10
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: GUILE-VERSION libguile/array-map.c libguile/fports.h libguile/gc.h libguile/inline.h libguile/ports.c libguile/ports.h libguile/print.c libguile/r6rs-ports.c libguile/read.c test-suite/tests/00-socket.test
| * tests: Skip IPv6 socket tests when OS support is missing.Ludovic Courtès2013-04-091-1/+10
| | | | | | | | | | | | | | | | Reported by Samuel Thibault <samuel.thibault@gnu.org> and Peter Simons <simons@cryp.to>. * test-suite/tests/00-socket.test ("AF_INET6/SOCK_STREAM"): Throw `unresolved' when `bind' throws EADDRNOTAVAIL.
* | Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver2013-03-281-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.ac libguile/deprecated.c libguile/deprecated.h libguile/filesys.h libguile/fluids.c libguile/fports.c libguile/gc.c libguile/guile.c libguile/numbers.c libguile/objcodes.c libguile/r6rs-ports.c libguile/smob.c libguile/socket.c libguile/threads.h module/language/scheme/decompile-tree-il.scm module/language/tree-il/peval.scm test-suite/tests/syncase.test
| * test-suite: eq-ness of numbers, characters is unspecifiedDaniel Hartwig2013-03-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test-suite/tests/00-socket.test: * test-suite/tests/alist.test: * test-suite/tests/elisp.test: * test-suite/tests/encoding-iso88591.test: * test-suite/tests/encoding-iso88597.test: * test-suite/tests/encoding-utf8.test: * test-suite/tests/hash.test: * test-suite/tests/i18n.test: * test-suite/tests/modules.test: * test-suite/tests/ports.test: * test-suite/tests/srfi-35.test: Make tests use eqv? instead of eq? when comparing numbers, characters. Checked also for similar uses of assq[-ref]. * test-suite/tests/vlist.test ("vhash-delete honors HASH"): Change test to use eqv-ness, not eq-ness, which should not impact its purpose as these two are equivalent for strings.
| * warn on multithreaded forkAndy Wingo2013-01-171-0/+513
| | | | | | | | | * libguile/posix.c (scm_fork): Issue a warning on a multithreaded fork. * doc/ref/posix.texi (Processes): Add note about multithreaded fork. * test-suite/tests/00-socket.test: Moved here, from socket.test, so as to run before any threads are created. * test-suite/Makefile.am: Adapt.
* signal an error on multithreaded forkAndy Wingo2012-02-241-0/+516
* libguile/posix.c (scm_fork): Signal an error if a `fork' is attempted after threads have been spawned. * test-suite/tests/00-socket.test: Moved here, from socket.test, so as to run before any threads are created. * test-suite/Makefile.am: Adapt.