diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2015-02-09 21:06:36 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2015-02-09 21:06:36 +0000 |
commit | 015ab1ed222bcb3f7d53ce04c9f7b93219401c45 (patch) | |
tree | c9a7699b949ae4b994cbcc26e3c17c04acc06a30 /regress | |
parent | 94a2448fb3992e61e47c3c873ac89ef1e2f1cea1 (diff) |
Error messages form libtls have changed, adapt syslogd tests.
Diffstat (limited to 'regress')
14 files changed, 38 insertions, 19 deletions
diff --git a/regress/usr.sbin/syslogd/args-server-tcp-error.pl b/regress/usr.sbin/syslogd/args-server-tcp-error.pl index ec6a3abf70c..8869bffe0e4 100644 --- a/regress/usr.sbin/syslogd/args-server-tcp-error.pl +++ b/regress/usr.sbin/syslogd/args-server-tcp-error.pl @@ -42,8 +42,7 @@ our %args = ( }, file => { loggrep => { - qr/syslogd: loghost .* connection error: $errors/ - => 1, + qr/syslogd: loghost .* connection error: $errors/ => 1, }, }, ); diff --git a/regress/usr.sbin/syslogd/args-server-tcp-reconnect.pl b/regress/usr.sbin/syslogd/args-server-tcp-reconnect.pl index 7c9cd9a937d..6a2d8b8e74c 100644 --- a/regress/usr.sbin/syslogd/args-server-tcp-reconnect.pl +++ b/regress/usr.sbin/syslogd/args-server-tcp-reconnect.pl @@ -9,6 +9,10 @@ use strict; use warnings; use Socket; +use Errno ':POSIX'; + +my @errors = (ECONNREFUSED); +my $errors = "(". join("|", map { $! = $_ } @errors). ")"; our %args = ( client => { @@ -22,7 +26,7 @@ our %args = ( loghost => '@tcp://127.0.0.1:$connectport', loggrep => { qr/Logging to FORWTCP \@tcp:\/\/127.0.0.1:\d+/ => '>=6', - qr/syslogd: connect .* Connection refused/ => '>=2', + qr/syslogd: connect .*: $errors/ => '>=2', get_between2loggrep(), }, }, @@ -46,13 +50,13 @@ our %args = ( loggrep => { qr/Accepted/ => 2, qr/syslogd: loghost .* connection close/ => 1, - qr/syslogd: connect .* Connection refused/ => 1, + qr/syslogd: connect .*: $errors/ => 1, get_between2loggrep(), }, }, file => { loggrep => { - qr/syslogd: connect .* Connection refused/ => '>=1', + qr/syslogd: connect .*: $errors/ => '>=1', get_between2loggrep(), }, }, diff --git a/regress/usr.sbin/syslogd/args-server-tls-close.pl b/regress/usr.sbin/syslogd/args-server-tls-close.pl index 45330d0b7c2..60bda434b3f 100644 --- a/regress/usr.sbin/syslogd/args-server-tls-close.pl +++ b/regress/usr.sbin/syslogd/args-server-tls-close.pl @@ -40,7 +40,7 @@ our %args = ( }, file => { loggrep => { - qr/syslogd: loghost .* connection error: read failed \(5\)/ => 1, + qr/syslogd: loghost .* connection error: read failed: EOF/ => 1, }, }, ); diff --git a/regress/usr.sbin/syslogd/args-server-tls-error.pl b/regress/usr.sbin/syslogd/args-server-tls-error.pl index 987c53834b1..bcb41dedee5 100644 --- a/regress/usr.sbin/syslogd/args-server-tls-error.pl +++ b/regress/usr.sbin/syslogd/args-server-tls-error.pl @@ -9,6 +9,10 @@ use strict; use warnings; use Socket; +use Errno ':POSIX'; + +my @errors = (ECONNRESET); +my $errors = "(". join("|", map { $! = $_ } @errors). ")"; our %args = ( client => { @@ -38,7 +42,7 @@ our %args = ( }, file => { loggrep => { - qr/syslogd: loghost .* connection error: read failed \(5\)/ => 1, + qr/syslogd: loghost .* connection error: read failed: $errors/ => 1, }, }, ); diff --git a/regress/usr.sbin/syslogd/args-server-tls-reconnect.pl b/regress/usr.sbin/syslogd/args-server-tls-reconnect.pl index ec70366883b..2dce2dbc3bf 100644 --- a/regress/usr.sbin/syslogd/args-server-tls-reconnect.pl +++ b/regress/usr.sbin/syslogd/args-server-tls-reconnect.pl @@ -9,6 +9,10 @@ use strict; use warnings; use Socket; +use Errno ':POSIX'; + +my @errors = (ECONNREFUSED); +my $errors = "(". join("|", map { $! = $_ } @errors). ")"; our %args = ( client => { @@ -22,7 +26,7 @@ our %args = ( loghost => '@tls://127.0.0.1:$connectport', loggrep => { qr/Logging to FORWTLS \@tls:\/\/127.0.0.1:\d+/ => '>=6', - qr/syslogd: connect .* Connection refused/ => '>=2', + qr/syslogd: connect .*: $errors/ => '>=2', get_between2loggrep(), }, }, @@ -46,13 +50,13 @@ our %args = ( loggrep => { qr/Accepted/ => 2, qr/syslogd: loghost .* connection error/ => 1, - qr/syslogd: connect .* Connection refused/ => 1, + qr/syslogd: connect .*: $errors/ => 1, get_between2loggrep(), }, }, file => { loggrep => { - qr/syslogd: connect .* Connection refused/ => '>=1', + qr/syslogd: connect .*: $errors/ => '>=1', get_between2loggrep(), }, }, diff --git a/regress/usr.sbin/syslogd/args-server-tls-tcp.pl b/regress/usr.sbin/syslogd/args-server-tls-tcp.pl index f9cb714c203..2c518d07746 100644 --- a/regress/usr.sbin/syslogd/args-server-tls-tcp.pl +++ b/regress/usr.sbin/syslogd/args-server-tls-tcp.pl @@ -39,8 +39,8 @@ our %args = ( }, file => { loggrep => { - qr/syslogd: loghost .* connection error: TLS connect failed \(1\)/ - => 1, + qr/syslogd: loghost .* connection error: connect failed: error:.*/. + qr/SSL23_GET_SERVER_HELLO:unknown protocol/ => 1, }, }, ); diff --git a/regress/usr.sbin/syslogd/args-tls-cafile-default.pl b/regress/usr.sbin/syslogd/args-tls-cafile-default.pl index 390df3b499a..c22d49f2ac5 100644 --- a/regress/usr.sbin/syslogd/args-tls-cafile-default.pl +++ b/regress/usr.sbin/syslogd/args-tls-cafile-default.pl @@ -15,7 +15,8 @@ our %args = ( loggrep => { qr/CAfile \/etc\/ssl\/cert.pem/ => 1, qr/Logging to FORWTLS \@tls:\/\/localhost:\d+/ => '>=4', - qr/connection error: TLS connect failed \(1\)/ => 2, + qr/syslogd: loghost .* connection error: connect failed: error:.*/. + qr/SSL3_GET_SERVER_CERTIFICATE:certificate verify failed/ => 2, get_testlog() => 1, }, cacrt => "default", diff --git a/regress/usr.sbin/syslogd/args-tls-cafile-empty.pl b/regress/usr.sbin/syslogd/args-tls-cafile-empty.pl index 399f8fc7ec1..04ca863fc3d 100644 --- a/regress/usr.sbin/syslogd/args-tls-cafile-empty.pl +++ b/regress/usr.sbin/syslogd/args-tls-cafile-empty.pl @@ -15,7 +15,8 @@ our %args = ( loggrep => { qr/CAfile empty, size 0/ => 1, qr/Logging to FORWTLS \@tls:\/\/localhost:\d+/ => '>=4', - qr/error: ssl verify memory setup failure/ => 2, + qr/syslogd: loghost .* connection error: /. + qr/ssl verify memory setup failure/ => 2, get_testlog() => 1, }, cacrt => "empty", diff --git a/regress/usr.sbin/syslogd/args-tls-cafile-fake.pl b/regress/usr.sbin/syslogd/args-tls-cafile-fake.pl index fc2630cd322..6eaac549d6e 100644 --- a/regress/usr.sbin/syslogd/args-tls-cafile-fake.pl +++ b/regress/usr.sbin/syslogd/args-tls-cafile-fake.pl @@ -15,7 +15,8 @@ our %args = ( loggrep => { qr/CAfile fake-ca.crt/ => 1, qr/Logging to FORWTLS \@tls:\/\/localhost:\d+/ => '>=4', - qr/connection error: TLS connect failed \(1\)/ => 2, + qr/syslogd: loghost .* connection error: connect failed: error:.*/. + qr/RSA_padding_check_PKCS1_type_1:block type is not 01/ => 2, get_testlog() => 1, }, cacrt => "fake-ca.crt", diff --git a/regress/usr.sbin/syslogd/args-tls-cafile-noexist.pl b/regress/usr.sbin/syslogd/args-tls-cafile-noexist.pl index d936bb8de57..86c421fb9ba 100644 --- a/regress/usr.sbin/syslogd/args-tls-cafile-noexist.pl +++ b/regress/usr.sbin/syslogd/args-tls-cafile-noexist.pl @@ -15,7 +15,8 @@ our %args = ( loggrep => { qr/open CAfile: No such file or directory/ => 2, qr/Logging to FORWTLS \@tls:\/\/localhost:\d+/ => '>=4', - qr/error: ssl verify setup failure/ => 2, + qr/syslogd: loghost .* connection error: /. + qr/ssl verify setup failure/ => 2, get_testlog() => 1, }, cacrt => "noexist", diff --git a/regress/usr.sbin/syslogd/args-tls-cafile-toobig.pl b/regress/usr.sbin/syslogd/args-tls-cafile-toobig.pl index 80486fbed66..17c33b13621 100644 --- a/regress/usr.sbin/syslogd/args-tls-cafile-toobig.pl +++ b/regress/usr.sbin/syslogd/args-tls-cafile-toobig.pl @@ -15,7 +15,8 @@ our %args = ( loggrep => { qr/CAfile larger than 1GB/ => 2, qr/Logging to FORWTLS \@tls:\/\/localhost:\d+/ => '>=4', - qr/error: ssl verify setup failure/ => 2, + qr/syslogd: loghost .* connection error: /. + qr/ssl verify setup failure/ => 2, get_testlog() => 1, }, cacrt => "toobig", diff --git a/regress/usr.sbin/syslogd/args-tls-cipher-null.pl b/regress/usr.sbin/syslogd/args-tls-cipher-null.pl index 6ee63e20826..6ea3ef9dfb1 100644 --- a/regress/usr.sbin/syslogd/args-tls-cipher-null.pl +++ b/regress/usr.sbin/syslogd/args-tls-cipher-null.pl @@ -14,7 +14,8 @@ our %args = ( loghost => '@tls://localhost:$connectport', loggrep => { qr/Logging to FORWTLS \@tls:\/\/localhost:\d+/ => '>=4', - qr/connection error: TLS connect failed \(1\)/ => 2, + qr/syslogd: loghost .* connection error: connect failed: error.*:/. + qr/SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure/ => 2, get_testlog() => 1, }, cacrt => "ca.crt", diff --git a/regress/usr.sbin/syslogd/args-tls-host-bad.pl b/regress/usr.sbin/syslogd/args-tls-host-bad.pl index 3067702989a..36208172855 100644 --- a/regress/usr.sbin/syslogd/args-tls-host-bad.pl +++ b/regress/usr.sbin/syslogd/args-tls-host-bad.pl @@ -14,7 +14,8 @@ our %args = ( loghost => '@tls://127.0.0.1:$connectport', loggrep => { qr/Logging to FORWTLS \@tls:\/\/127.0.0.1:\d+/ => '>=4', - qr/error: host `127.0.0.1' not present in server/ => '>=1', + qr/syslogd: loghost .* connection error: /. + qr/host `127.0.0.1' not present in server/ => '>=1', get_testlog() => 1, }, cacrt => "ca.crt", diff --git a/regress/usr.sbin/syslogd/args-tls-verify.pl b/regress/usr.sbin/syslogd/args-tls-verify.pl index 284ac9903d5..4dae90fff65 100644 --- a/regress/usr.sbin/syslogd/args-tls-verify.pl +++ b/regress/usr.sbin/syslogd/args-tls-verify.pl @@ -15,6 +15,7 @@ our %args = ( loggrep => { qr/Logging to FORWTLS \@tls:\/\/localhost:\d+/ => '>=4', get_testlog() => 1, + qr/syslogd: loghost .* connection error: connect failed:/ => 0, }, cacrt => "ca.crt", }, |