Skip Menu |

This queue is for tickets about the Test-postgresql CPAN distribution.

Report information
The Basics
Id: 131920
Status: open
Priority: 0/
Queue: Test-postgresql

People
Owner: Nobody in particular
Requestors: exodist7 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Breaks with long temp dir path
I am attaching a test that is slightly modified from your synopsis. This test sets $ENV{TMPDIR} to a very long directory name. I get the following errors: !prove -Ilib -v xxx.t xxx.t .. 1..0 # SKIP Failed to start postgres on port 15442: Failed to open /tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/pgtest.bfrXe/data/postmaster.pid: No such file or directory at /home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.30.0/Test/PostgreSQL.pm line 429. skipped: Failed to start postgres on port 15442: Failed to open /tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/pgtest.bfrXe/data/postmaster.pid: No such file or directory at /home/exodist/perl5/perlbrew/perls/main/lib/site_perl/5.30.0/Test/PostgreSQL.pm line 429. Files=1, Tests=0, 1 wallclock secs ( 0.01 usr 0.00 sys + 0.70 cusr 0.24 csys = 0.95 CPU) Result: NOTESTS Note that the errors do not occur if I set a short custom directory name. I will also note that it is not the length of any section of the dir, I can do /tmp/foo/bar/baz/.... and once it gets long enough the errors happen. This is mainly a problem in yath (Test2::Harness) which gives all running tests their own temp directories to avoid cross-contamination. It does not always happen, current version of yath on cpan does not produce long enough temp dirs to be a problem, but an update coming soon does. Under yath there is additional debugging output: ( STDERR ) job 1 pg_ctl: could not start server ( STDERR ) job 1 Examine the log output. ( STDERR ) job 1 pg_ctl: could not start server ( STDERR ) job 1 Examine the log output. ( STDERR ) job 1 pg_ctl: could not start server ( STDERR ) job 1 Examine the log output. ( STDERR ) job 1 pg_ctl: could not start server ( STDERR ) job 1 Examine the log output. ( STDERR ) job 1 pg_ctl: could not start server ( STDERR ) job 1 Examine the log output. ( STDERR ) job 1 pg_ctl: could not start server ( STDERR ) job 1 Examine the log output. ( STDERR ) job 1 pg_ctl: could not start server ( STDERR ) job 1 Examine the log output. ( STDERR ) job 1 pg_ctl: could not start server ( STDERR ) job 1 Examine the log output. ( STDERR ) job 1 pg_ctl: could not start server ( STDERR ) job 1 Examine the log output. ( STDERR ) job 1 pg_ctl: could not start server ( STDERR ) job 1 Examine the log output. ( STDERR ) job 1 pg_ctl: could not start server ( STDERR ) job 1 Examine the log output. I am not sure if this is a limitation in Test:PostgreSQL, or in postgres itself.
Subject: xxx.t
BEGIN { my $dir = "/tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; $ENV{TMPDIR} = $dir; } use DBI; use Test::PostgreSQL; use Test::More; my $pgsql = eval { Test::PostgreSQL->new() } or plan skip_all => $@; my $dbh = DBI->connect($pgsql->dsn); ok(1); done_testing;
On Fri Feb 21 11:39:36 2020, EXODIST wrote: Show quoted text
> This test sets $ENV{TMPDIR} to a very long directory name. I get the > following errors: >
(snip) Show quoted text
> > I am not sure if this is a limitation in Test:PostgreSQL, or in > postgres itself.
Thanks for reporting this -- We the authors are more active on Github, so I've linked to this issue from here: https://github.com/TJC/Test-postgresql/issues/37 I'm not actively using T:PG any more myself, but I believe some other co-maintainers may be able to help. Cheers Toby