diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-08-23 21:20:06 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-08-23 21:20:06 +0000 |
commit | 2c0c58d93cc9d56a938b2ac03c713bfeaf050edb (patch) | |
tree | aea591935d1dc74903ac01f6dcefe94618f900cc /regress/usr.sbin/syslogd/args-tls-cert-empty.pl | |
parent | 9cf9759be93c6f693b71b5e76ca026ac525b4c29 (diff) |
Some syslogd tests failed to report errors. Make these tests more
strict and adapt the check patterns.
Diffstat (limited to 'regress/usr.sbin/syslogd/args-tls-cert-empty.pl')
-rw-r--r-- | regress/usr.sbin/syslogd/args-tls-cert-empty.pl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/regress/usr.sbin/syslogd/args-tls-cert-empty.pl b/regress/usr.sbin/syslogd/args-tls-cert-empty.pl index c9b1aece0d2..703042bcdd5 100644 --- a/regress/usr.sbin/syslogd/args-tls-cert-empty.pl +++ b/regress/usr.sbin/syslogd/args-tls-cert-empty.pl @@ -6,12 +6,16 @@ use strict; use warnings; use Socket; +my $key = "/etc/ssl/private/127.0.0.1:6514.key"; my $cert = "/etc/ssl/127.0.0.1:6514.crt"; my @sudo = $ENV{SUDO} ? $ENV{SUDO} : (); -my @cmd = (@sudo, "cp", "--", "empty", $cert); +my @cmd = (@sudo, "cp", "--", "127.0.0.1.key", $key); +system(@cmd) and die "Command '@cmd' failed: $?"; +@cmd = (@sudo, "cp", "--", "empty", $cert); system(@cmd) and die "Command '@cmd' failed: $?"; END { - my @cmd = (@sudo, "rm", "-f", "--", $cert); + local $?; + my @cmd = (@sudo, "rm", "-f", "--", $key, $cert); system(@cmd) and warn "Command '@cmd' failed: $?"; } @@ -32,12 +36,12 @@ our %args = ( options => ["-S", "127.0.0.1:6514"], ktrace => { qr{NAMI "/etc/ssl/private/127.0.0.1:6514.key"} => 1, - qr{NAMI "/etc/ssl/private/127.0.0.1.key"} => 1, qr{NAMI "/etc/ssl/127.0.0.1:6514.crt"} => 1, + qr{NAMI "/etc/ssl/private/127.0.0.1.key"} => 0, qr{NAMI "/etc/ssl/127.0.0.1.crt"} => 0, }, loggrep => { - qr{Keyfile /etc/ssl/private/127.0.0.1.key} => 1, + qr{Keyfile $key} => 1, qr{Certfile $cert} => 1, qr{syslogd: tls_configure server} => 2, }, |