diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-01-03 17:36:40 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-01-03 17:36:40 +0000 |
commit | 439f9b4a840f88141347e1dd7e9ee5bb43589307 (patch) | |
tree | c32594a76889878a276c61c8eed78bd82c6f05ac /regress/sys/kern/sosplice/tcp/args-relay-read-eof.pl | |
parent | 2ce7bb12a1f7d2fbfd4f40267a189c00bef845a0 (diff) |
Reengineer the socket splicing regression tests:
- Move the tests from splice to new sosplice directory for consistent naming.
- Split the API tests and the TCP splicing tests into separate directories.
- Create some tests for the upcoming UDP splicing.
- Tests can be run in obj directories now.
- The API tests can run both on a local and on a remote machine now.
- Fix the forking TCP tests which splice and read or write simultaneously.
- Bunch of little fixes for races in the tests.
- Deduplicate code, move checks into common functions.
Diffstat (limited to 'regress/sys/kern/sosplice/tcp/args-relay-read-eof.pl')
-rw-r--r-- | regress/sys/kern/sosplice/tcp/args-relay-read-eof.pl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/regress/sys/kern/sosplice/tcp/args-relay-read-eof.pl b/regress/sys/kern/sosplice/tcp/args-relay-read-eof.pl new file mode 100644 index 00000000000..4394efca336 --- /dev/null +++ b/regress/sys/kern/sosplice/tcp/args-relay-read-eof.pl @@ -0,0 +1,25 @@ +# test waiting for splice finish with read and eof has happend + +use strict; +use warnings; + +our %args = ( + client => { + # fill server buffer, relay send buffer, half relay recv buffer + # then send eof + len => 2**13 + 2**10, + }, + relay => { + nonblocking => 1, + readblocking => 1, + sndbuf => 2**12, + rcvbuf => 2**12, + }, + server => { + # wait until all buffers are filled and client sends eof + func => sub { sleep 4; read_stream(@_); }, + rcvbuf => 2**12, + }, + len => 9216, + md5 => "6d263239be35ccf30cb04c5f58a35dbe", +); |