summaryrefslogtreecommitdiffstats
path: root/tools/regression/sockets
Commit message (Collapse)AuthorAgeFilesLines
* Add regression tests for the setsockopt(2) SO_SETFIB socket option.bz2012-02-173-0/+262
| | | | | | | | Check that the expected domain(9) families all handle the socket option correctly and do proper bounds checks. This would catch bugs as fixed in (r230938,)r230981. Sponsored by: Cisco Systems, Inc.
* - Add a test for PR 151758.jhb2011-12-091-26/+54
| | | | | | | | | | | | | - While here, make this compile and work on non-i386: - Use CMSG_SPACE(), CMSG_LEN(), and CMSG_FIRSTHDR() instead of ignoring padding between 'struct cmsghdr' and control message payloads. - Don't initialize the control message before calling recvmsg(). Instead, check that we get a valid control message on return from recvmsg(). - Use errx() instead of err() for some errors that don't report failures that set errno. Requested by: kib (1)
* Allow to specify path to a file we want to test with sendfile(2).pjd2010-12-111-3/+16
| | | | This allows to specify selected file system and not only /tmp/.
* Extend the unix gc regression test to cover the case of r216150.kib2010-12-031-9/+54
| | | | | Requested and reviewed by: rwatson MFC after: 1 week
* Correct several nits/problems in the unix_close_race regression test.rwatson2010-05-271-10/+16
| | | | | Submitted by: Mikolaj Golub <to.my.trociny at gmail.com> MFC after: 3 days
* Add unix_close_race, a regresion test to catch ENOTCONN being returnedrwatson2010-05-262-0/+139
| | | | | | | | | | | | improperly from one of two instances of close(2) being called simultaneously on both ends of a connected UNIX domain socket. The test tool is slightly tweaked to improve failure modes, and while often does trigger the problem, doesn't do so consistently due to the nature of the race. PR: kern/144061 Submitted by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
* Always assign WARNS using ?=uqs2010-03-022-2/+2
| | | | | | | - fix some nearby style bugs - include Makefile.inc where it makes sense and reduces duplication Approved by: ed (co-mentor)
* Fixed missing or broken library dependencies.ru2010-02-251-1/+2
|
* Update the sendfile regression test so that it outputs results in thebrucec2010-02-242-169/+242
| | | | | | | | TAP format. Add a checksum to verify that the data hasn't been corrupted between being read from disk and being received. Approved by: rrs (mentor)
* A few regression tests for SOCK_SEQPACKET UNIX domain sockets.rwatson2009-10-054-0/+593
| | | | Sponsored by: Google
* - Remove a bogus test: setsockopt() doesn't return a length, getsockopt()jhb2009-09-231-4/+1
| | | | | does. - Use %z to printf a size_t to fix compile on 64-bit platforms.
* In UNIX domain socket GC regression test, after setting a socketrwatson2009-03-081-1/+1
| | | | non-blocking, EINPROGRESS is an acceptable result from connect().
* Add very simple regression test for fstat(2) on sockets: make sure itrwatson2008-10-062-0/+80
| | | | | returns success for various socket types. It's easy to imagine this being enhanced to validate the returned data, but...
* o Correct a comment: a test file size is a four pages not three.maxim2008-09-101-1/+1
|
* Add unix_sorflush, a regression test for the following scenario:rwatson2008-01-302-0/+106
| | | | | | | | | | | | - Process (a) is blocked in read on a socket waiting on data. - Process (b) is blocked in shutdown() on a socket waiting on (a). - Process (c) delivers a signal to (b) interrupting its wait. When the signal is delivered, the kernel panics as sblock() fails in sorflush(). Even if it didn't panic, shutdown() would block potentially indefinitely waiting for recv() to succeeded. Fixes to follow. Reported by: Jos Backus <jos at catnook dot com>
* Add regression tests for UNIX domain socket garbage collection. Should berwatson2007-12-312-0/+770
| | | | | run from single-user mode, as they look at global open file and inflight descriptor counts to check for leaks.
* Add a regression test to detect if waiting on the I/O serialization lockrwatson2007-05-062-0/+216
| | | | | | | on socket buffers is interruptible or not, which detacts the regression I introduced recently in 7-CURRENT (spotted by alfred). This test passes in older -CURRENT, and with the as-yet uncommitted sx_xlock_sig and sblock fix patches.
* Test sending 0 bytes.pjd2007-04-201-0/+6
|
* Fix length calculation.pjd2007-04-201-1/+1
|
* Valid error codes for err() and errx() are 1..255.des2007-04-192-27/+29
| | | | The correct format specifier for ssize_t is %zd.
* Add more tests to verify last sendfile(2) breakage: test sending morepjd2007-04-191-3/+38
| | | | than a page size and nbytes=0.
* Fix a fd leak in socketpair():jhb2007-04-021-0/+33
| | | | | | - Close the new file objects created during socketpair() if the copyout of the new file descriptors fails. - Add a test to the socketpair regression test for this edge case.
* Add another fd leak test for accept() I used to test the fix in 1.234 ofjhb2007-04-021-1/+83
| | | | sys/kern/uipc_syscall.c.
* Ignore EINPROGRESS error on TCP connect(), and pick up the result of therwatson2007-01-121-4/+23
| | | | | | | non-blocking connect later using select(). This case didn't trigger on my UP test box, but did on Peter's SMP test box. Spotted by: peter
* Add a regression test for sending and writing zero bytes to sockets ofrwatson2007-01-122-0/+278
| | | | | | | | | | | various types, as well as pipes and fifos for good measure. RELENG_6 currently passes all of these tests, but 7-CURRENT fails 0-byte writes and sends on all stream socket types (and fifos, as they are based on stream sockets). Bumped into by: peter Diagnosed by: jhb Problem of: andre
* Drop all received data mbufs from a socket's queue if the MT_SONAMEbms2006-12-232-0/+116
| | | | | | | | | | | | | mbuf is dropped, to preserve the invariant in the PR_ADDR case. Add a regression test to detect this condition, but do not hook it up to the build for now. PR: kern/38495 Submitted by: James Juran Reviewed by: sam, rwatson Obtained from: NetBSD MFC after: 2 weeks
* Add a short regression test to try to exercise races in the non-atomicrwatson2006-11-152-0/+219
| | | | | | | nature of implied connect via sendto(). Oddly, uipc_usrreq.c implements this for stream sockets, but doesn't set the flag in its protocol definition so that it can actually be used. As such, the stream test is implemented but doesn't run for now.
* o style.Makefile(5): WARNS= -> WARNS?=.maxim2006-07-097-7/+7
|
* o Let getopt(3) report errors in command line arguments.maxim2006-05-311-13/+11
| | | | | | | | o If something is wrong with options, then output short usage help message. o Output errstr returned from strtonum(3). PR: bin/98141 Submitted by: Andrey Simonenko
* o Add a collection of regression tests for ancillary (control)maxim2006-05-294-0/+1823
| | | | | | | | | | | | | | | | | | | | | | | data passing for unix domain sockets, stream and datagram. There are 15 tests: Test/Type of socket STREAM DGRAM ---------------------------------------------------------------------- Sending, receiving cmsgcred 1 6 Receiving sockcred (listening socket has LOCAL_CREDS) 2 n/a Receiving sockcred (accepted socket has LOCAL_CREDS) 3 n/a Receiving sockcred n/a 7 Sending cmsgcred, receiving sockcred 4 8 Sending, receiving timestamp 5 9 Sending, receiving cmsgcred (no control data) 10 13 Sending cmsgcred, receiving sockcred (no control data) 11 14 Sending, receiving timestamp (no control data) 12 15 Currently we pass 8 tests. All the rest marked as TODO. PR: kern/90800 Submitted by: Andrey Simonenko
* Use WARNS and rely on rules rather than an explicit target for therwatson2006-05-252-6/+2
| | | | | | test binary. Reported by: maxim
* Add a basic regression test for sendfile() over TCP, which sends varyingrwatson2006-05-252-0/+337
| | | | | lengths of headers and data and makes sure it receives about the right number of bytes.
* Add a simple regression test that creates and tears down route sockets,rwatson2006-04-092-0/+108
| | | | | and confirms that only SOCK_RAW works with socket(), and nothing works with socketpair().
* Add simple regression tests that creates UNIX domain sockets usingrwatson2006-04-092-0/+91
| | | | | socket() and socketpair() of SOCK_STREAM and SOCK_DGRAM types. It also confirms that SOCK_RAW fails.
* Style: NO_MAN doesn't need any value.ru2006-03-154-4/+4
|
* Add unix_passfd, a simple set of regression tests for UNIX domain socketrwatson2005-11-092-0/+314
| | | | file descriptor passing. These tests are not all currently passed.
* Add a regression test for listen()'s backlog argument, both at time ofrwatson2005-09-182-0/+389
| | | | | | | | creation and at time of update using an additional call to listen(). This test also exercises SO_LISTENQLIMIT, a forthcoming socket option that allows the retrieval (but not setting) of the queue limit. Discussed with: andre
* Remove checks for shutdown(2) on non-connected socket.maxim2005-09-151-7/+0
|
* o Add shutdown(2) regression tests. At the moment we cannot passmaxim2005-09-122-0/+124
| | | | shutdown-on-non connected socket test, kern/84761.
* o setsockopt(2) cannot remove accept filter. [1]maxim2005-06-111-10/+46
| | | | | | | | | | o getsockopt(SO_ACCEPTFILTER) always returns success on listen socket even we didn't install accept filter on the socket. o Fix these bugs and add regression tests for them. Submitted by: Igor Sysoev [1] Reviewed by: alfred MFC after: 2 weeks
* Close the connect socket as well as the listen socket on completion.rwatson2005-05-161-2/+2
| | | | Update copyright.
* Check the return value of shutdown().rwatson2005-03-111-4/+8
|
* Add sigpipe, a simple UNIX domain socket and TCP regression test that isrwatson2005-03-112-0/+327
| | | | | | | | | | | | | intended to verify that SIGPIPE is delivered to a process writing or sending on a socket that has been shut down for write. If available, SO_NOSIGPIPE is also tested. This regression test is currently passed by RELENG_4, but not by HEAD or RELENG_5, due to a bug in the write() code for sockets. SO_NOSIGPIPE is not present in RELENG_4, however, so is not tested there. Reported by: Mikko Tyolajarvi <mbsd at pacbell dot net> PR: 78478
* Add a simple regression test for stream UNIX domain sockets and therwatson2005-02-202-0/+325
| | | | | | bind()/connect() system calls, which is intended to confirm that the right successes and errors occur when rendezvousing via the file system name space.
* Use WARNS?= instead of WARNS= in Makefiles so that global warningrwatson2005-01-222-2/+2
| | | | | | settings can override local ones. Pointed out by: ru
* Add test which excersises problem with unability to change association ofsobomax2005-01-122-0/+149
| | | | | already associated datagram unix domain socket by issuing connect() system call.
* Start the dreaded NOFOO -> NO_FOO conversion.ru2004-12-215-5/+5
| | | | OK'ed by: core
* Switch over to a different, more flexible test output protocol that'snik2004-11-116-27/+112
| | | | | | | | | | | | | | | | | | | | understood by Perl's Test::Harness module and prove(1) commands. Update README to describe the new protocol. The work's broken down into two main sets of changes. First, update the existing test programs (shell scripts and C programs) to produce output in the ok/not ok format, and to, where possible, also produce a header describing the number of tests that are expected to be run. Second, provide the .t files that actually run the tests. In some cases these are copies of, or very similar too, scripts that already existed. I've kept the old scripts around so that it's possible to verify that behaviour under this new system (in terms of whether or not a test fails) is identical to the behaviour under the old system. Add a TODO file.
* Add a small regression test that opens a TCP socket, listens on it,rwatson2004-11-022-0/+120
| | | | | | | | performs a non-blocking connect from another socket, and then closes the listen socket rather than accepting. This is intended to exercise the close path in which connections are aborted due to a close on the listen socket while the connection is in the listen queue.
* For variables that are only checked with defined(), don't provideru2004-10-243-3/+3
| | | | any fake value.
OpenPOWER on IntegriCloud