[PATCH] Tests: fixed Valgrind errors filtering

Maxim Dounin mdounin at mdounin.ru
Sat May 31 22:20:31 UTC 2025


# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1748729541 -10800
#      Sun Jun 01 01:12:21 2025 +0300
# Node ID 7bfe91f27c949eac6152ac9954129b6338bbb815
# Parent  ba4f76b3b823c59b5a56343b6110b3524ed008b2
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.

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