On 03.04.21 14:30, Michael Paquier wrote:
On Fri, Apr 02, 2021 at 01:45:31PM +0900, Michael Paquier wrote:
As a whole, this is a consolidation of its own, so let's apply this
part first.

Slight rebase for this one to take care of the updates with the SSL
error messages.

I noticed this patch eliminated one $Test::Builder::Level assignment. Was there a reason for this?

I think we should add it back, and also add a few missing ones in similar places. See attached patch.
>From e9ce373a0482799dc37a695058fc2ca4370f33d1 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 22 Sep 2021 08:58:07 +0200
Subject: [PATCH] Add missing $Test::Builder::Level settings

---
 src/test/authentication/t/001_password.pl | 2 ++
 src/test/authentication/t/002_saslprep.pl | 2 ++
 src/test/kerberos/t/001_auth.pl           | 2 ++
 src/test/ldap/t/001_auth.pl               | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/src/test/authentication/t/001_password.pl 
b/src/test/authentication/t/001_password.pl
index 427a360198..1296c5307a 100644
--- a/src/test/authentication/t/001_password.pl
+++ b/src/test/authentication/t/001_password.pl
@@ -42,6 +42,8 @@ sub reset_pg_hba
 # named parameters are passed to connect_ok/fails as-is.
 sub test_role
 {
+       local $Test::Builder::Level = $Test::Builder::Level + 1;
+
        my ($node, $role, $method, $expected_res, %params) = @_;
        my $status_string = 'failed';
        $status_string = 'success' if ($expected_res eq 0);
diff --git a/src/test/authentication/t/002_saslprep.pl 
b/src/test/authentication/t/002_saslprep.pl
index f080a0ccba..5b8b4b28e7 100644
--- a/src/test/authentication/t/002_saslprep.pl
+++ b/src/test/authentication/t/002_saslprep.pl
@@ -36,6 +36,8 @@ sub reset_pg_hba
 # Test access for a single role, useful to wrap all tests into one.
 sub test_login
 {
+       local $Test::Builder::Level = $Test::Builder::Level + 1;
+
        my $node          = shift;
        my $role          = shift;
        my $password      = shift;
diff --git a/src/test/kerberos/t/001_auth.pl b/src/test/kerberos/t/001_auth.pl
index b5594924ca..27c93abe78 100644
--- a/src/test/kerberos/t/001_auth.pl
+++ b/src/test/kerberos/t/001_auth.pl
@@ -185,6 +185,8 @@ END
 # Test connection success or failure, and if success, that query returns true.
 sub test_access
 {
+       local $Test::Builder::Level = $Test::Builder::Level + 1;
+
        my ($node, $role, $query, $expected_res, $gssencmode, $test_name,
                @expect_log_msgs)
          = @_;
diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl
index 0ae14e4c85..0dfc1f9ee1 100644
--- a/src/test/ldap/t/001_auth.pl
+++ b/src/test/ldap/t/001_auth.pl
@@ -166,6 +166,8 @@ END
 
 sub test_access
 {
+       local $Test::Builder::Level = $Test::Builder::Level + 1;
+
        my ($node, $role, $expected_res, $test_name, %params) = @_;
        my $connstr = "user=$role";
 
-- 
2.33.0

Reply via email to