summaryrefslogtreecommitdiff
path: root/regress/sys/kern/sosplice/tcp/args-server-abort.pl
blob: 31cd885d95b172c76c470743b8a2037f77ca60dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# test server reads and exits after reading some data

use strict;
use warnings;

our %args = (
    client => {
	func => sub { errignore(@_); write_stream(@_); },
	len => 2**30,  # not reached
	sndbuf => 2**10,  # small buffer triggers error during write
	# the error message seems to be timing dependent
	down => "Client print failed: (Broken pipe|Connection reset by peer)",
	nocheck => 1,
	error => 54,
    },
    relay => {
	func => sub { errignore(@_); relay(@_); },
	rcvbuf => 2**10,
	sndbuf => 2**10,
	down => "Broken pipe|Connection reset by peer",
	nocheck => 1,
	errorin => 0,  # syscall has read the error and resetted it
	errorout => 54,
    },
    server => {
	alarm => 3,
	nocheck => 1,
    },
    noecho => 1,
);