Version 1.23 92ssl_connection.t fails in openSUSE Build Service
Opened this issue · 7 comments
It started to fail in openSUSE Tumbleweed about two weeks ago, maybe an issue with a dependency that changed its output?
[ 6s] [156/170] cumulate libmariadb3-3.3.10-1.1
[ 6s] [159/170] cumulate mariadb-client-11.4.2-1.1
[ 6s] [168/170] cumulate mariadb-11.4.2-1.1
[ 6s] [170/170] cumulate libmariadb-devel-3.3.10-1.1
...
[ 18s] 2024-07-04 22:24:19 120 [Warning] Aborted connection 120 to db: 'unconnected' user: 'unauthenticated' host: 'localhost' (This connection closed normally without authentication)
[ 18s]
[ 18s] # Failed test 'DBD::MariaDB supports mariadb_ssl=1 without mariadb_ssl_optional=1 and fail because cannot enforce SSL encryption'
[ 18s] # at t/92ssl_connection.t line 32.
[ 18s] # 'TLS/SSL error: self-signed certificate'
[ 18s] # doesn't match '(?^:^SSL connection error: )'
[ 18s] # Error message: TLS/SSL error: self-signed certificate
[ 18s] # Looks like you failed 1 test of 2.
[ 18s] t/92ssl_connection.t ....................
[ 18s] Dubious, test returned 1 (wstat 256, 0x100)
[ 18s] Failed 1/2 subtests
Do you have a link for a working build, too? I'd be interested in the list of the versions of the dependencies...
here is the build for Leap 15.6:
https://build.opensuse.org/package/live_build_log/devel:languages:perl/perl-DBD-MariaDB/15.6/x86_64
unfortunately I don't have a log for the last passing Tumbleweed anymore, as logs aren't saved...
all builds: https://build.opensuse.org/package/show/devel:languages:perl/perl-DBD-MariaDB
That's a pity. The passing log shows the problematic test was skipped:
t/92ssl_connection.t .................... skipped: Server does not support SSL connections
Some of the Github Actions run the test and it seems to pass:
103_perl-system_mysql-8.0.4-rc_same-as-server_dbi-latest.txt:2024-06-30T17:23:58.7499575Z t/92ssl_connection.t .................... ok
104_perl-system_mysql-8.0.11_same-as-server_dbi-latest.txt:2024-06-30T17:23:58.7660878Z t/92ssl_connection.t .................... ok
105_perl-system_mysql-8.0.12_same-as-server_dbi-latest.txt:2024-06-30T17:24:21.7937403Z t/92ssl_connection.t .................... ok
106_perl-system_mysql-8.0.13_same-as-server_dbi-latest.txt:2024-06-30T17:24:26.7177791Z t/92ssl_connection.t .................... ok
107_perl-system_mysql-8.0.14_same-as-server_dbi-latest.txt:2024-06-30T17:24:29.7375505Z t/92ssl_connection.t .................... ok
108_perl-system_mysql-8.0.15_same-as-server_dbi-latest.txt:2024-06-30T17:24:47.4048129Z t/92ssl_connection.t .................... ok
109_perl-system_mysql-8.0.16_same-as-server_dbi-latest.txt:2024-06-30T17:23:20.2191787Z t/92ssl_connection.t .................... ok
110_perl-system_mysql-8.0.17_same-as-server_dbi-latest.txt:2024-06-30T17:23:35.7510085Z t/92ssl_connection.t .................... ok
111_perl-system_mysql-8.0.20_same-as-server_dbi-latest.txt:2024-06-30T17:23:42.1160843Z t/92ssl_connection.t .................... ok
112_perl-system_mysql-8.0.21_same-as-server_dbi-latest.txt:2024-06-30T17:23:22.9480127Z t/92ssl_connection.t .................... ok
113_perl-system_mysql-8.0.22_same-as-server_dbi-latest.txt:2024-06-30T17:23:32.1119173Z t/92ssl_connection.t .................... ok
114_perl-system_mysql-8.0.33_same-as-server_dbi-latest.txt:2024-06-30T17:23:22.3728912Z t/92ssl_connection.t .................... ok
115_perl-system_mysql-8.0.34_same-as-server_dbi-latest.txt:2024-06-30T17:23:26.5063498Z t/92ssl_connection.t .................... ok
98_perl-system_mysql-5.7.43_same-as-server_dbi-latest.txt:2024-06-30T17:20:10.5530298Z t/92ssl_connection.t .................... ok
The remaining runs skipped it.
We are now using this patch to make the test pass: https://build.opensuse.org/projects/devel:languages:perl/packages/perl-DBD-MariaDB/files/perl-DBD-MariaDB-fix_ssl_connection_test.patch?expand=1
Do you have a link for a working build, too? I'd be interested in the list of the versions of the dependencies...
Want PR? Honestly, I think that there are people around here that can do a commit or PR with much better comment than I would be able to come up with
t/92ssl_connection.t ..
1..2
not ok 1 - DBD::MariaDB supports mariadb_ssl=1 without mariadb_ssl_optional=1 and fail because cannot enforce SSL encryption
# Failed test 'DBD::MariaDB supports mariadb_ssl=1 without mariadb_ssl_optional=1 and fail because cannot enforce SSL encryption'
# at t/92ssl_connection.t line 32.
# 'TLS/SSL error: self-signed certificate'
# doesn't match '(?^:^SSL connection error: )'
# Error message: TLS/SSL error: self-signed certificate
ok 2 - DBD::MariaDB error code is SSL related
# Looks like you failed 1 test of 2.
diff --git a/t/92ssl_connection.t b/t/92ssl_connection.t
index 44ba7e7..d2c57a2 100644
--- a/t/92ssl_connection.t
+++ b/t/92ssl_connection.t
@@ -29,6 +29,6 @@ if (defined $dbh) {
ok(defined $cipher, 'SSL connection was established') and diag("mariadb_ssl_cipher is: $cipher");
}
} else {
- like($DBI::errstr, qr/^SSL connection error: /, 'DBD::MariaDB supports mariadb_ssl=1 without mariadb_ssl_optional=1 and fail because cannot enforce SSL encryption') or diag('Error message: ' . ($DBI::errstr || 'unknown'));
+ like($DBI::errstr, qr{^(?:SSL connection error|TLS/SSL error): }, 'DBD::MariaDB supports mariadb_ssl=1 without mariadb_ssl_optional=1 and fail because cannot enforce SSL encryption') or diag('Error message: ' . ($DBI::errstr || 'unknown'));
is($DBI::err, 2026, 'DBD::MariaDB error code is SSL related') or diag('Error code: ' . ($DBI::err || 'unknown'));
}
t/92ssl_connection.t ..
1..2
ok 1 - DBD::MariaDB supports mariadb_ssl=1 without mariadb_ssl_optional=1 and fail because cannot enforce SSL encryption
ok 2 - DBD::MariaDB error code is SSL related
ok
All tests successful.
Files=1, Tests=2, 1 wallclock secs ( 0.01 usr 0.00 sys + 0.05 cusr 0.00 csys = 0.06 CPU)
Result: PASS