Commit Graph

121 Commits

Author SHA1 Message Date
Robert Watson
868ee99ce3 Close the connect socket as well as the listen socket on completion.
Update copyright.
2005-05-16 00:53:38 +00:00
Robert Watson
d64ac531ac Check the return value of shutdown(). 2005-03-11 13:05:18 +00:00
Robert Watson
b27b61f9eb Add sigpipe, a simple UNIX domain socket and TCP regression test that is
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
2005-03-11 12:47:14 +00:00
Robert Watson
9d62322505 Add a simple regression test for stream UNIX domain sockets and the
bind()/connect() system calls, which is intended to confirm that the
right successes and errors occur when rendezvousing via the file system
name space.
2005-02-20 22:21:53 +00:00
Robert Watson
20ef44d423 Use WARNS?= instead of WARNS= in Makefiles so that global warning
settings can override local ones.

Pointed out by:	ru
2005-01-22 22:42:39 +00:00
Maxim Sobolev
c520d61bc3 Add test which excersises problem with unability to change association of
already associated datagram unix domain socket by issuing connect() system
call.
2005-01-12 09:57:18 +00:00
Ruslan Ermilov
e653b48c80 Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by:	core
2004-12-21 08:47:35 +00:00
Nik Clayton
00e13b1d67 Switch over to a different, more flexible test output protocol that's
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.
2004-11-11 19:47:55 +00:00
Robert Watson
c6eea89879 Add a small regression test that opens a TCP socket, listens on it,
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.
2004-11-02 17:59:12 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Robert Watson
09745181fd Use errx() instead of fprintf()/exit() for conciseness.
Suggested by:	ru (some time ago)
2004-10-23 22:18:37 +00:00
Robert Watson
a09c60ffeb Use errx() instead of perror()/exit() for conciseness.
Suggested by:	ru (some time ago)
2004-10-23 22:11:35 +00:00
Robert Watson
54516c29e8 Modify accept_fd_leak regression test to generate "PASS" output, not
just "FAIL" output, in order to make it consistent with other tests in
the regression test tree.
2004-09-18 13:06:00 +00:00
Ruslan Ermilov
751d4065e6 Join the effort in simplifying this makefile. ;) 2004-09-03 06:18:52 +00:00
Robert Watson
accbe49470 Pass O_NONBLOCK directly to fcntl() rather than the pointer to an int
holding the value O_NONBLOCK.  This worked previously because I was
lucky.
2004-09-02 21:41:57 +00:00
Robert Watson
27b37d5cf2 Don't override the rule used to build a binary by providing our own
compiler line.
2004-09-02 21:37:50 +00:00
Robert Watson
cf03a9be9c Make sure to properly initialize 'size' to sizeof(sin) before passing
it into accept().  Depending on the initial value in memory, it is
otherwise possible to get EINVAL.
2004-08-24 04:59:26 +00:00
Robert Watson
62967fb0bb Add a basic kqueue + UNIX domain socket pair regression test to do some
elementary exercising of kqueues on datagram and stream sockets.  Note
that the datagram write kqueue case is left untested due to potentially
confusing behavior for the developer (me) that might require attention.
2004-08-24 04:02:41 +00:00
Robert Watson
07727c8333 Add minimal socketpair() regression test to confirm that we can create
(and close) PF_UNIX socket pairs, and that we can't create PF_INET
socket pairs.  More tests to follow.
2004-08-04 03:46:35 +00:00
Robert Watson
43cb0b2b09 Simple attachment regression test to attach the "accf_data" accept
filter to an inet socket and check at various points during the socket
life cycle that the filter can or cannot be attached, and that once
attached that the right one is attached and that it can be queried.
2004-07-26 03:53:47 +00:00
Robert Watson
90d6d28efa Add simple regression test to detect leakage of file descriptors when
accept() returns EAGAIN on a non-blocking listen socket.  This is the
tool I used to check that such a bug was resolved when merging accept()
locking.
2004-07-17 16:56:46 +00:00