Commit 458a1244 authored by Tom Lane's avatar Tom Lane

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
parent 69bcd718
......@@ -879,9 +879,10 @@ sub check_pgbench_logs
my ($prefix, $nb, $min, $max, $re) = @_;
my @logs = glob "$prefix.*";
my $qprefix = quotemeta($prefix);
my @logs = glob "$qprefix.*";
ok(@logs == $nb, "number of log files");
ok(grep(/^$prefix\.\d+(\.\d+)?$/, @logs) == $nb, "file name format");
ok(grep(/^$qprefix\.\d+(\.\d+)?$/, @logs) == $nb, "file name format");
my $log_number = 0;
for my $log (sort @logs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment