Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 663792 - dev-db/pgtap-0.98.0 : [TEST] psql: could not connect to server: No such file or directory
Summary: dev-db/pgtap-0.98.0 : [TEST] psql: could not connect to server: No such file ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Aaron W. Swenson
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2018-08-16 15:42 UTC by Toralf Förster
Modified: 2020-12-09 04:24 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.66 KB, text/plain)
2018-08-16 15:42 UTC, Toralf Förster
Details
dev-db:pgtap-0.98.0:20180815-225622.log (dev-db:pgtap-0.98.0:20180815-225622.log,6.67 KB, text/plain)
2018-08-16 15:43 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,182.65 KB, text/plain)
2018-08-16 15:43 UTC, Toralf Förster
Details
environment (environment,36.11 KB, text/plain)
2018-08-16 15:43 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,13.61 KB, application/x-bzip)
2018-08-16 15:43 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,11.48 KB, application/x-bzip)
2018-08-16 15:43 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2018-08-16 15:42:54 UTC
(using postmaster on Unix socket, default port)
============== dropping database "contrib_regression" ==============
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/run/postgresql/.s.PGSQL.5432"?
command failed: "/usr/lib64/postgresql-10/bin/psql" -X -c "DROP DATABASE IF EXISTS \"contrib_regression\"" "postgres"

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0-desktop-gnome-systemd_test_20180809-181720

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.0 *

Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python2.7 (fallback)
  [3]   pypy3 (fallback)

java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.8.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpv dev-db/pgtap
[ebuild  N    ] dev-db/pgtap-0.98.0  POSTGRES_TARGETS="postgres10 postgres9_5 -postgres9_3 -postgres9_4 -postgres9_6"
Comment 1 Toralf Förster gentoo-dev 2018-08-16 15:42:57 UTC
Created attachment 543692 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2018-08-16 15:43:00 UTC
Created attachment 543694 [details]
dev-db:pgtap-0.98.0:20180815-225622.log
Comment 3 Toralf Förster gentoo-dev 2018-08-16 15:43:03 UTC
Created attachment 543696 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2018-08-16 15:43:05 UTC
Created attachment 543698 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2018-08-16 15:43:08 UTC
Created attachment 543700 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2018-08-16 15:43:11 UTC
Created attachment 543702 [details]
temp.tbz2
Comment 7 Larry the Git Cow gentoo-dev 2018-11-28 11:26:14 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b1bad3a6068b974161b6404cb21a85227637e6e

commit 7b1bad3a6068b974161b6404cb21a85227637e6e
Author:     Aaron W. Swenson <titanofold@gentoo.org>
AuthorDate: 2018-11-28 11:25:18 +0000
Commit:     Aaron W. Swenson <titanofold@gentoo.org>
CommitDate: 2018-11-28 11:25:55 +0000

    dev-db/pgtap: Bump to 0.99.0
    
    Ebuild now restricts tests.
    
    Bug: https://bugs.gentoo.org/663792
    Package-Manager: Portage-2.3.51, Repoman-2.3.11
    Signed-off-by: Aaron W. Swenson <titanofold@gentoo.org>

 dev-db/pgtap/Manifest            |  1 +
 dev-db/pgtap/pgtap-0.99.0.ebuild | 30 ++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)
Comment 8 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2018-12-10 14:52:41 UTC
In order to get tests actually functioning, I had to run:

> createuser -w -s -U postgres portage

And additionally, due to running in a chroot I had to follow the instructions in:

https://wiki.gentoo.org/wiki/OpenRC#Chroot_support

and run `openrc` to get things initialized,
and make sure postgres was configured via emerge --config
and then ensure postgres was running via /etc/init.d/postgresql-10 start

After performing these steps, tests work, but not pass.

Instead of simply restricting tests, maybe some documentation with these instructions may help ( either in the ewarn log data, or in an elogged link to a page on wiki.gentoo.org, similar to what I do here: https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/dev-perl/DBD-Pg )

After performing this dance, test output becomes:

============== dropping database "contrib_regression" ==============
NOTICE:  database "contrib_regression" does not exist, skipping                 
DROP DATABASE                                                              
============== creating database "contrib_regression" ==============         
CREATE DATABASE                      
ALTER DATABASE                        
============== installing plpgsql                     ==============
CREATE LANGUAGE                                           
============== running regression test queries        ==============
test do_tap                   ... ok
test performs_ok              ... ok                                                      
test privs                    ... ok                                                     
test functap                  ... ok                                                                           
test check                    ... ok                                                                               
test todotap                  ... ok                                                                 
test runnotests               ... ok                                             
test roletap                  ... ok                          
test runtests                 ... ok
test moretap                  ... ok                                              
test unique                   ... ok          
test runjusttests             ... ok          
test usergroup                ... ok         
test matching                 ... ok              
test coltap                   ... ok     
test partitions               ... FAILED
test pg73                     ... ok
test fktap                    ... ok
test throwtap                 ... ok
test extension                ... ok
test cmpok                    ... ok                                     
test valueset                 ... ok                     
test index                    ... ok                              
test aretap                   ... ok                                  
test enumtap                  ... ok               
test resultset                ... ok                              
test ruletap                  ... ok                                 
test hastap                   ... ok           
test util                     ... FAILED                    
test ownership                ... ok                
test performs_within          ... ok         
test pktap                    ... ok                      
test istap                    ... ok                     
test trigger                  ... ok         

If these failures are valuable, let me known and I'll file a bug. 

Similarly, I look forward do getting valuable results for newer versions with tests made unrestricted. Ideally the tests don't fail if you haven't configured postgres already, so in many cases, a skipped test suite is better than a non-running-non-useful-fail.

But wherever possible, I would much like to see tests run.
Comment 9 Aaron W. Swenson gentoo-dev 2020-12-09 04:24:10 UTC
Can't run from $ED as of now.