diff options
Diffstat (limited to 'regress/usr.sbin/syslogd/args-sighup-config.pl')
-rw-r--r-- | regress/usr.sbin/syslogd/args-sighup-config.pl | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/regress/usr.sbin/syslogd/args-sighup-config.pl b/regress/usr.sbin/syslogd/args-sighup-config.pl index 6643878ac68..a6c64e3fb5f 100644 --- a/regress/usr.sbin/syslogd/args-sighup-config.pl +++ b/regress/usr.sbin/syslogd/args-sighup-config.pl @@ -10,13 +10,11 @@ use warnings; our %args = ( client => { - func => sub { + func => sub { write_between2logs(shift, sub { my $self = shift; - write_between2logs($self, sub { - ${$self->{server}}->loggrep("Signal", 8) - or die ref($self), " no 'Signal' between logs"; - }); - }, + ${$self->{server}}->loggrep("Signal", 8) + or die ref($self), " no 'Signal' between logs"; + })}, loggrep => { get_between2loggrep() }, }, syslogd => { @@ -33,20 +31,18 @@ our %args = ( }, }, server => { - func => sub { + func => sub { read_between2logs(shift, sub { my $self = shift; - read_between2logs($self, sub { - my $conffile = ${$self->{syslogd}}->{conffile}; - open(my $fh, '>>', $conffile) - or die ref($self), " append conf file $conffile failed: $!"; - print $fh "# modified\n"; - close($fh); - ${$self->{syslogd}}->kill_syslogd('HUP'); - ${$self->{syslogd}}->loggrep("syslogd: started", 5, 2) - or die ref($self), " no 'syslogd: started' between logs"; - print STDERR "Signal\n"; - }); - }, + my $conffile = ${$self->{syslogd}}->{conffile}; + open(my $fh, '>>', $conffile) + or die ref($self), " append conf file $conffile failed: $!"; + print $fh "# modified\n"; + close($fh); + ${$self->{syslogd}}->kill_syslogd('HUP'); + ${$self->{syslogd}}->loggrep("syslogd: started", 5, 2) + or die ref($self), " no 'syslogd: started' between logs"; + print STDERR "Signal\n"; + })}, loggrep => { get_between2loggrep() }, }, ); |