[PATCH] pgbench tap tests fail if the path contains a perl special character

From: Raúl Marín Rodríguez <rmrodriguez(at)carto(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] pgbench tap tests fail if the path contains a perl special character
Date: 2019-01-18 17:15:46
Message-ID: CAM6_UM6dGdU39PKAC24T+HD9ouy0jLN9vH6163K8QEEzr__iZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

As mentioned in the subject, if the $PATH where you are building postgres
contains a perl's special character [1], for example a `+`, pgbench's tap
tests will fail.

The outputs looks something like this (full at [2]):
```
# Failed test 'file name format'
# at t/001_pgbench_with_server.pl line 805.

# Failed test 'file name format'
# at t/001_pgbench_with_server.pl line 805.
# Looks like you failed 2 tests of 312.
t/001_pgbench_with_server.pl ..
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/312 subtests
t/002_pgbench_no_server.pl .... ok
```

This error affects both PG11 and master, and a way to reproduce it is by
renaming the source folder from `postgresql` to `postgresql+XXX`.

I'm attaching a patch to fix this by using quotemeta [3]. It's generated
from master and also applies to REL_11_STABLE.

1 - http://jkorpela.fi/perl/regexp.html
2 - https://launchpadlibrarian.net/406634533/buildlog_ubuntu-xenial-amd64.postgresql-11_11.1.1+carto-2_BUILDING.txt.gz
3 - https://perldoc.perl.org/functions/quotemeta.html

Regards,
--
Raúl Marín Rodríguez
carto.com

Attachment Content-Type Size
pgbench_prefix-v1.patch text/x-patch 741 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-01-18 17:35:49 Re: [PATCH] pgbench tap tests fail if the path contains a perl special character
Previous Message Tom Lane 2019-01-18 16:35:56 Re: Tid scan improvements