[nginx-tests] Tests: fixed Valgrind errors filtering.

Maxim Dounin mdounin at mdounin.ru
Wed Jun 4 23:29:11 UTC 2025


details:   http://freenginx.org/hg/nginx-tests/rev/7bfe91f27c94
branches:  
changeset: 2009:7bfe91f27c94
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Sun Jun 01 01:12:21 2025 +0300
description:
Tests: fixed Valgrind errors filtering.

Broken in 1995:d329b05e20fa during $t->grep_file() introduction and
resulted in warnings in output (and no filtering) when testing with
TEST_NGINX_VALGRIND set.

diffstat:

 lib/Test/Nginx.pm |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff --git a/lib/Test/Nginx.pm b/lib/Test/Nginx.pm
--- a/lib/Test/Nginx.pm
+++ b/lib/Test/Nginx.pm
@@ -89,7 +89,7 @@ sub DESTROY {
 	}
 
 	if (Test::More->builder->expected_tests && $ENV{TEST_NGINX_VALGRIND}) {
-		my $errors = $self->grep_file('valgrind.log', /^==\d+== .+/m);
+		my $errors = $self->grep_file('valgrind.log', qr/^==\d+== .+/m);
 		Test::More::is($errors, '', 'no valgrind errors');
 	}
 


More information about the nginx-devel mailing list