1# The client writes long messages while ttylog to user has been stopped.
2# The syslogd writes it into a file and through a pipe and to tty.
3# The syslogd passes it via UDP to the loghost.
4# The server receives the message on its UDP socket.
5# Find the message in client, file, pipe, user, syslogd, server log.
6# Check that syslogd has logged that the user's tty blocked.
7
8use strict;
9use warnings;
10use Sys::Syslog qw(:macros);
11
12our %args = (
13    client => {
14	func => sub {
15	    my $self = shift;
16	    ${$self->{syslogd}}->ttykill("user", 'STOP');
17	    write_lines($self, 9, 900);
18	    ${$self->{syslogd}}->loggrep(qr/ttymsg delayed write/, 3);
19	    ${$self->{syslogd}}->ttykill("user", 'CONT');
20	    write_log($self);
21	},
22    },
23    syslogd => {
24	loggrep => {
25	    qr/ttymsg delayed write/ => '>=1',
26	},
27    },
28    user => {
29	loggrep => {
30	    qr/ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.* [12]/ => 2,
31	    get_testgrep() => 1,
32	},
33    },
34);
35
361;
37