summaryrefslogtreecommitdiffstats
path: root/tests/sys
Commit message (Collapse)AuthorAgeFilesLines
* Add several ATF tests that deal with multiple fibs. They're described inasomers2014-03-204-0/+469
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | several different PRs, but the tests share some common code, so I'm committing them together. sbin/ifconfig/tests sbin/ifconfig/tests/fibs_test.sh sbin/ifconfig/tests/Makefile sbin/ifconfig/Makefile Add fibs_test.sh, which regresses bin/187551 tests/sys/netinet tests/sys/netinet/fibs_test.sh tests/sys/netinet/udp_dontroute.c tests/sys/netinet/Makefile tests/sys/Makefile Add fibs_test.sh, which regresses kern/167947, kern/187552 kern/187549, kern/187550, and kern/187553 etc/mtree/BSD.tests.dist Add newly created directories PR: bin/187551 PR: kern/167947 PR: kern/187552 PR: kern/187549 PR: kern/187550 PR: kern/187553 Discussed with: melifaro MFC after: 3 weeks Sponsored by: Spectra Logic Corporation
* Added sysctl kern.maxfiles increase test, do not use /etc/passwd for testspho2014-03-191-6/+118
| | | | | | | and use volatile sig_atomic_t for signal handler variable. Reviewed by: asomers (previous version) Sponsored by: EMC / Isilon storage division
* Make bsd.test.mk the only public mk fragment for the building of tests.jmmv2014-03-141-1/+1
| | | | | | | | | | | | | | Change {atf,plain,tap}.test.mk to be internal implementation details of bsd.test.mk. Makefiles that build tests should now only include bsd.test.mk and declaratively specify what they want to build, without worrying about the internal implementation of the mk files. The reason for this change is to permit building test programs of different interfaces from a single directory, which is something I had a need for while porting tests over from src/tools/regression/. Additionally, this change makes it possible to perform some other requested changes to bsd.test.mk in an easier manner. Coming soon.
* Replace 4.4BSD Lite's unix domain socket backpressure hack with a cleanerasomers2014-03-131-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mechanism, based on the new SB_STOP sockbuf flag. The old hack dynamically changed the sending sockbuf's high water mark whenever adding or removing data from the receiving sockbuf. It worked for stream sockets, but it never worked for SOCK_SEQPACKET sockets because of their atomic nature. If the sockbuf was partially full, it might return EMSGSIZE instead of blocking. The new solution is based on DragonFlyBSD's fix from commit 3a6117bbe0ed6a87605c1e43e12a1438d8844380 on 2008-05-27. It adds an SB_STOP flag to sockbufs. Whenever uipc_send surpasses the socket's size limit, it sets SB_STOP on the sending sockbuf. sbspace() will then return 0 for that sockbuf, causing sosend_generic and friends to block. uipc_rcvd will likewise clear SB_STOP. There are two fringe benefits: uipc_{send,rcvd} no longer need to call chgsbsize() on every send and receive because they don't change the sockbuf's high water mark. Also, uipc_sense no longer needs to acquire the UIPC linkage lock, because it's simpler to compute the st_blksizes. There is one drawback: since sbspace() will only ever return 0 or the maximum, sosend_generic will allow the sockbuf to exceed its nominal maximum size by at most one packet of size less than the max. I don't think that's a serious problem. In fact, I'm not even positive that FreeBSD guarantees a socket will always stay within its nominal size limit. sys/sys/sockbuf.h Add the SB_STOP flag and adjust sbspace() sys/sys/unpcb.h Delete the obsolete unp_cc and unp_mbcnt fields from struct unpcb. sys/kern/uipc_usrreq.c Adjust uipc_rcvd, uipc_send, and uipc_sense to use the SB_STOP backpressure mechanism. Removing obsolete unpcb fields from db_show_unpcb. tests/sys/kern/unix_seqpacket_test.c Clear expected failures from ATF. Obtained from: DragonFly BSD PR: kern/185812 Reviewed by: silence from freebsd-net@ and rwatson@ MFC after: 3 weeks Sponsored by: Spectra Logic Corporation
* kern/Makefileasomers2014-03-072-34/+31
| | | | | | | | | | | | Set WARNS=5 for all files in this directory kern/unix_seqpacket_test.c Fix compiler warnings. Most were benign, but rcvbuf_oversized wasn't working as intended because I forgot to set the buffer sizes. MFC after: 2 weeks Reported by: pho Sponsored by: Spectra Logic Corporation
* Only use -lpthread for unix_seqpacket_test, not for all test programs.asomers2014-03-061-1/+1
| | | | | | Reported by: Garrett Cooper MFC after: 3 weeks Sponsored by: Spectra Logic Corporation
* Fix PR kern/185813 "SOCK_SEQPACKET AF_UNIX sockets with asymmetricalasomers2014-03-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buffers drop packets". It was caused by a check for the space available in a sockbuf, but it was checking the wrong sockbuf. sys/sys/sockbuf.h sys/kern/uipc_sockbuf.c Add sbappendaddr_nospacecheck_locked(), which is just like sbappendaddr_locked but doesn't validate the receiving socket's space. Factor out common code into sbappendaddr_locked_internal(). We shouldn't simply make sbappendaddr_locked check the space and then call sbappendaddr_nospacecheck_locked, because that would cause the O(n) function m_length to be called twice. sys/kern/uipc_usrreq.c Use sbappendaddr_nospacecheck_locked for SOCK_SEQPACKET sockets, because the receiving sockbuf's size limit is irrelevant. tests/sys/kern/unix_seqpacket_test.c Now that 185813 is fixed, pipe_128k_8k fails intermittently due to 185812. Make it fail every time by adding a usleep after starting the writer thread and before starting the reader thread in test_pipe. That gives the writer time to fill up its send buffer. Also, clear the expected failure message due to 185813. It actually said "185812", but that was a typo. PR: kern/185813 Reviewed by: silence from freebsd-net@ and rwatson@ MFC after: 3 weeks Sponsored by: Spectra Logic Corporation
* Preserve naming consistency for test cases.pho2014-03-051-3/+3
| | | | | Pointed out by: jmmv Sponsored by: EMC / Isilon storage division
* Changed name of test case to a more descriptive one and movedpho2014-03-041-10/+8
| | | | | | | comment to the "descr" property. Suggested by: jmmv Sponsored by: EMC / Isilon storage division
* Added a regression test for r234131.pho2014-02-262-1/+82
| | | | | Discussed with: asomers Sponsored by: EMC / Isilon storage division
* test_eagain_*_* should've been using nonblocking sockets instead ofasomers2014-02-171-1/+1
| | | | | | | | | | blocking sockets. The error was not exposed as long as the kernel suffered from PR kern/185812. Now corrected, these tests pass on DragonFlyBSD 3.6.0. PR: kern/185812 Sponsored by: Spectra Logic Corporation MFC after: 2 weeks
* tests/sys/Makefileasomers2014-02-081-5/+3
| | | | | | | | | | 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. Sponsored by: Spectra Logic MFC after: 5 days X-MFC-With: r261133
* Fix the Makefiles so that the tests I submitted in r261081 will actuallyasomers2014-01-241-0/+1
| | | | | | | | get built. Sponsored by: Spectra Logic MFC after: 13 days X-MFC-With: r261081
* Replace the old unix_seqpacket and unix_seqpacket_exercise tests, whichasomers2014-01-233-0/+1140
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. PR: kern/185812 PR: kern/185813 Sponsored by: Spectra Logic MFC after: 2 weeks
OpenPOWER on IntegriCloud