summaryrefslogtreecommitdiffstats
path: root/tools/regression/sockets
Commit message (Collapse)AuthorAgeFilesLines
* MFC r298881, 298882, 298883, 298885:pfg2016-05-151-1/+1
| | | | | | | Minor spelling fixes in: tools, share, bluetooth, pmcstat, etc Many of these have user-visible strings.
* MFC r294125:ngie2016-01-232-5/+5
| | | | | | | | | Test for EPROTOTYPE not EPROTONOSUPPORT - `SOCK_RAW` is the implied supported type parameter for socket(2) per route(4) - localsw in `sys/kern/uipc_usrreq.c` doesn't have an entry for `SOCK_RAW`, so the prototype is invalid (this isn't explicitly documented anywhere I could find)
* MFC r294126:ngie2016-01-212-4/+2
| | | | | | | | | | | | | Fix warnings with gcc 5.0 reconnect.c: - Convert the K&R prototype of main to an ANSI prototype to mute a warning from gcc 4.2.1 - Close s_sock2 after finishing off the last test to plug a leak and mute a warning from gcc 5.0 about a -Wunused-but-set variable sendfile.c: - Fix a -Wunused-but-set warning with gcc 5.0 with pagesize in main(..)
* MFC r294127:ngie2016-01-212-33/+33
| | | | | | | | | Fix warnings with clang/gcc - Get rid of unused argc/argv variables in main - Exit on failure with a return code of 1 instead of -1 with err/errx as a return code of -1 is implementation dependent - Bump WARNS to 6
* MFC r294128:ngie2016-01-192-2/+2
| | | | | | | Fix -Wunused warning with clang/gcc - Get rid of unused argc/argv variables in main - Bump WARNS to 6
* MFC r294103:ngie2016-01-191-2/+13
| | | | | | - Check for accf_filter before running the tests, otherwise it will always fail at subtest 9/11 - Use strncpy instead of strcpy with afa.af_name
* MFC r294123:ngie2016-01-191-1/+1
| | | | | | | Add missing newline to message about requiring root privileges This will help ensure that scripts/parsers don't get confused when the message is printed out
* MFC r292914,r292957:ngie2016-01-062-397/+0
| | | | | | | | | | | | | | | | | | | | r292914: Integrate tools/regression/sockets/unix_passfd into the FreeBSD test suite as tests/sys/kern/unix_passfd_test - Convert testcases to ATF - Fix an alignment issues - Mark rights_creds_payload(..) as an expected failure (see PR # 181741) https://reviews.freebsd.org/D689 Submitted by: markj r292957: Rename `recvfd` and `sendfd` variables in recvfd/sendfd functions to avoid -Wshadow issues with gcc
* MFC r292814:ngie2016-01-041-5/+6
| | | | | | | | | - Explicitly initialize ch to 0 - Delete some spurious whitespace - Use calloc instead of malloc in the last test to ensure that sendspace is properly zero'ed out Submitted by: markj
* MFC ↵ngie2015-04-2543-202/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r261550,r281354,r281355,r281356,r281358,r281359,r281360,r281361,r281362,r281391,r281392,r281393,r281394,r281395,r281397,r281398,r281399,r281400,r281401,r281402,r281403,r281404,r281407,r281408,r281409,r281410,r281411: r261550 (by glebius): Add test case for kern/181741. Right now test fails. PR: 181741 Sponsored by: Nginx, Inc. r281354: Fix warnings, fix a typo in a testcase description, bump WARNS to 3 - Remove argc/argv (-Wunused) - Cast len in comparison to size_t (-Wsign-compare) Sponsored by: EMC / Isilon Storage Division r281355: Fix -Wunused warnings, bump WARNS to 6 The testcase fails today on subtest # 9 The output is still broken if prove -rv is run and the testcase aborts prematurely (the testcase doesn't really conform to TAP protocol properly, except when it completes fully) Sponsored by: EMC / Isilon Storage Division r281356: Fix -Wunused warnings, bump WARNS to 6 The output is still broken if prove -rv is run and the testcase aborts prematurely with fail_assertion (the testcase doesn't really conform to TAP protocol properly, except when it completes fully) Sponsored by: EMC / Isilon Storage Division r281358: - Parameterize out the number of accept/connect attempts - Randomize the bind port to allow 2+ consecutive calls in < 10 minutes, and to also not fail if (for instance) there's a server already listening on port 8080 - Don't leak the listening socket / fds into the child process - Fix warnings: -- Remove argc/argv (-Wunused) -- Mark sig __unused (-Wunused) -- Mark quit static (-Wmissing-variable-declarations) Sponsored by: EMC / Isilon Storage Division r281359: Remove argc/argv (-Wunused) Sponsored by: EMC / Isilon Storage Division r281360: Fix warnings - Remove argc/argv (-Wunused) - Mark some parameters to socket_listen_update __unused (-Wunused) Sponsored by: EMC / Isilon Storage Division r281361: Remove argc/argv (-Wunused) Sponsored by: EMC / Isilon Storage Division r281362: Use _exit, not exit in forked process Sponsored by: EMC / Isilon Storage Division r281391: - Use static buffers for temporary file paths instead of strdup of constant strings - Don't use /tmp because it's outside ATF's prescribed sandbox - Use mkstemp instead of mktemp to eliminate warning Sponsored by: EMC / Isilon Storage Division r281392: - Garbage collect argc/argv (-Wunused) - Bump WARNS to 6 Sponsored by: EMC / Isilon Storage Division r281393: Fix warnings and bump WARNS to 6 - Garbage collect argc/argv (-Wunused) - sleep(3) will always return an unsigned int; don't check for return codes <0 (-Wsign-compare) Sponsored by: EMC / Isilon Storage Division r281394: - Don't use /tmp because it's outside ATF's prescribed sandbox - Replace a hardcoded PATH_MAX value with sizeof(path) - Use path like an array, not a pointer, and always try to unlink it in cleanup Sponsored by: EMC / Isilon Storage Division r281395: Fix a -Wuninitialized warning by setting the socket to -1 and bump WARNS to 6 Sponsored by: EMC / Isilon Storage Division r281397: Mark signum unused in signal_handler; bump WARNS to 6 Sponsored by: EMC / Isilon Storage Division r281398: Garbage collect argc/argv and bump WARNS to 6 Sponsored by: EMC / Isilon Storage Division r281399: Fix warnings and bump WARNS to 6 - Staticize variables as needed - Garbage collect argc/argv - Fix -Wsign-compare warnings by casting small sizeof to (int) Sponsored by: EMC / Isilon Storage Division r281400: - Garbage collect argc/argv; bump WARNS to 6 - Make the socket path random and move it out of /tmp as that's outside ATF's prescribed path Sponsored by: EMC / Isilon Storage Division r281401: - Garbage collect argc/argv - Use random paths instead of one in /tmp Sponsored by: EMC / Isilon Storage Division r281402: Garbage collect argc/argv and bump WARNS to 6 Sponsored by: EMC / Isilon Storage Division r281403: Garbage collect argc/argv and bump WARNS to 6 Sponsored by: EMC / Isilon Storage Division r281404: Generate temporary files with mkstemp instead of mktemp Sponsored by: EMC / Isilon Storage Division r281407: Fix the knob twiddling to work properly per src.opts.mk Sponsored by: EMC / Isilon Storage Division r281408: - Remove the .t wrapper and put the "magic" of determining the number of testcases into the .c file - Require root for now because it fails with SOCK_RAW without root privileges - Increment the test count properly on socket create failure Sponsored by: EMC / Isilon Storage Division r281409: Fix warnings, bump WARNS to 6, and use a temporary socket instead of one in /tmp Sponsored by: EMC / Isilon Storage Division r281410: Fix more warnings I didn't catch in the first go-around Sponsored by: EMC / Isilon Storage Division r281411: Fix even more warnings.. Sponsored by: EMC / Isilon Storage Division
* MFC r264400,r265836:ngie2014-12-3124-24/+24
| | | | | | | | | | | | | | r264400: NO_MAN= has been deprecated in favor of MAN= for some time, go ahead and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit. r265836: Remove last two NO_MAN= in the tree. In both of these cases, MAN= is what is needed.
* MFC r261081, r261133, and r261615asomers2014-02-134-593/+0
| | | | | | | | | | | | | | | | | | | | r261081 Replace the old unix_seqpacket and unix_seqpacket_exercise tests, which were a little broken and not automatable, with unix_seqpacket_test. It's coverage is a superset of the old tests and it uses ATF. It includes test cases for bugs kern/185813 and kern/185812. r261133 Fix the Makefiles so that the tests I submitted in r261081 will actually get built. r261615 tests/sys/Makefile use TESTS_SUBDIRS for kern instead of SUBDIRS. I don't think it makes a difference in this case, but TESTS_SUBDIRS is generally correct for subdirectories that contain tests.
* Add a sendfile regression test for transmit length > file size.emaste2013-09-101-32/+64
| | | | | | | This test identified the issue fixed in FreeBSD-SA-13:11.sendfile. Sponsored by: The FreeBSD Foundation Approved by: re (glebius)
* Major update for unix_cmsg from Andrey Simonenko.pluknet2013-02-113-1249/+1652
| | | | | | | | | | | | | | | | | | Quoting the submitter: - Added tests for SCM_BINTIME, LOCAL_PEERCRED, cmsghdr.cmsg_len - Code that checks correctness of groups was corrected (getgroups(2) change) - unix_cmsg.c was completely redesigned and simplified - Use less timeout value in unix_cmsg.c for faster work - Added support for not sending data in a message, not sending data and data array associated with a cmsghdr structure in a message - Existent tests were improved - unix_cmsg.t was redesigned and simplified Correctness of unix_cmsg verified on 7.1-STABLE, 9.1-STABLE and 10-CURRENT. PR: bin/131567 Submitted by: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> MFC after: 2 weeks
* Zero the whole struct not just the size of a pointer.emaste2012-11-191-1/+1
| | | | Found by: clang
* Use '%zd' format specifier for ssize_temaste2012-11-193-13/+13
| | | | Found by: clang
* Use '%zd' printf format for ssize_t.emaste2012-11-191-2/+2
|
* remove duplicate semicolons where possible.eadler2012-10-221-1/+1
| | | | | Approved by: cperciva MFC after: 1 week
* 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.
OpenPOWER on IntegriCloud