Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e14536f

Browse files
committed
Fix under-quoted filename pattern in pgbench TAP test.
Avoids issues if build directory's pathname contains regex metacharacters. Raúl Marín Rodríguez Discussion: https://postgr.es/m/CAM6_UM6dGdU39PKAC24T+HD9ouy0jLN9vH6163K8QEEzr__iZw@mail.gmail.com
1 parent e4ffa0d commit e14536f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bin/pgbench/t/001_pgbench_with_server.pl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,10 @@ sub check_pgbench_logs
800800
{
801801
my ($prefix, $nb, $min, $max, $re) = @_;
802802

803-
my @logs = glob "$prefix.*";
803+
my $qprefix = quotemeta($prefix);
804+
my @logs = glob "$qprefix.*";
804805
ok(@logs == $nb, "number of log files");
805-
ok(grep(/^$prefix\.\d+(\.\d+)?$/, @logs) == $nb, "file name format");
806+
ok(grep(/^$qprefix\.\d+(\.\d+)?$/, @logs) == $nb, "file name format");
806807

807808
my $log_number = 0;
808809
for my $log (sort @logs)

0 commit comments

Comments
 (0)