From 74bf31f6419764313688670c0400539a54f1a4b6 Mon Sep 17 00:00:00 2001 From: bluhm Date: Thu, 22 Jan 2015 00:34:32 +0000 Subject: [PATCH] Make syslogd tests more reliable on slow machines. All tests pass on my old sparc64. --- regress/usr.sbin/syslogd/Syslogd.pm | 4 ++-- regress/usr.sbin/syslogd/args-server-tls-close.pl | 2 +- regress/usr.sbin/syslogd/funcs.pl | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/regress/usr.sbin/syslogd/Syslogd.pm b/regress/usr.sbin/syslogd/Syslogd.pm index bc233082424..dceed7b6da8 100644 --- a/regress/usr.sbin/syslogd/Syslogd.pm +++ b/regress/usr.sbin/syslogd/Syslogd.pm @@ -1,4 +1,4 @@ -# $OpenBSD: Syslogd.pm,v 1.8 2015/01/01 19:58:48 bluhm Exp $ +# $OpenBSD: Syslogd.pm,v 1.9 2015/01/22 00:34:32 bluhm Exp $ # Copyright (c) 2010-2015 Alexander Bluhm # Copyright (c) 2014 Florian Riehm @@ -56,7 +56,7 @@ sub new { open(my $fh, '>', $self->{conffile}) or die ref($self), " create conf file $self->{conffile} failed: $!"; print $fh "*.*\t$self->{outfile}\n"; - print $fh "*.*\t|dd of=$self->{outpipe} status=none\n"; + print $fh "*.*\t|dd of=$self->{outpipe}\n"; my $memory = $self->{memory}; print $fh "*.*\t:$memory->{size}:$memory->{name}\n" if $memory; my $loghost = $self->{loghost}; diff --git a/regress/usr.sbin/syslogd/args-server-tls-close.pl b/regress/usr.sbin/syslogd/args-server-tls-close.pl index 503bda147be..75620034f1e 100644 --- a/regress/usr.sbin/syslogd/args-server-tls-close.pl +++ b/regress/usr.sbin/syslogd/args-server-tls-close.pl @@ -24,7 +24,7 @@ our %args = ( loggrep => { qr/Logging to FORWTLS \@tls:\/\/127.0.0.1:\d+/ => '>=4', get_testlog() => 1, - qr/syslogd: loghost .* connection error/ => 2, + qr/syslogd: loghost .* connection error/ => '>=2', }, }, server => { diff --git a/regress/usr.sbin/syslogd/funcs.pl b/regress/usr.sbin/syslogd/funcs.pl index 85d086ffaaf..397a580db55 100644 --- a/regress/usr.sbin/syslogd/funcs.pl +++ b/regress/usr.sbin/syslogd/funcs.pl @@ -1,4 +1,4 @@ -# $OpenBSD: funcs.pl,v 1.11 2015/01/16 11:51:59 bluhm Exp $ +# $OpenBSD: funcs.pl,v 1.12 2015/01/22 00:34:32 bluhm Exp $ # Copyright (c) 2010-2015 Alexander Bluhm # @@ -233,6 +233,10 @@ sub loggrep { sub check_out { my ($r, %args) = @_; + unless ($args{pipe}{nocheck}) { + $r->loggrep("bytes transferred", 1) or sleep 1; + } + foreach my $name (qw(file pipe)) { next if $args{$name}{nocheck}; my $file = $r->{"out$name"} or die; -- 2.20.1