Summary: | dev-db/postgresql-server-{8.1.22,8.2.18,8.3.12} fail tests | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jeroen Roovers (RETIRED) <jer> |
Component: | [OLD] Server | Assignee: | PgSQL Bugs <pgsql-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aballier, titanofold |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 339935 | ||
Attachments: |
dev-db:postgresql-server-8.1.22:20101129-233344.log [hppa,fail]
dev-db:postgresql-server-8.2.18:20101129-235119.log [hppa,fail] |
Description
Jeroen Roovers (RETIRED)
![]() Created attachment 255883 [details]
dev-db:postgresql-server-8.1.22:20101129-233344.log [hppa,fail]
make[3]: `refint.so' is up to date.
make[3]: `autoinc.so' is up to date.
make[3]: Leaving directory `/dev/shm/portage/dev-db/postgresql-server-8.1.22/work/postgresql-8.1.22/contrib/spi'
rm -rf ./testtablespace
mkdir ./testtablespace
clientbindir="/usr/lib/postgresql-8.1/bin/" /bin/sh ./pg_regress --temp-install --top-builddir=../../.. --temp-port=55432 --schedule=./parallel_schedule --multibyte=SQL_ASCII --load-language=plpgsql
============== creating temporary installation ==============
============== initializing database system ==============
============== starting postmaster ==============
pg_regress: postmaster did not start
Examine ./log/postmaster.log for the reason.
./pg_regress: line 266: kill: (31932) - No such process
make[2]: *** [check] Error 2
make[2]: Leaving directory `/dev/shm/portage/dev-db/postgresql-server-8.1.22/work/postgresql-8.1.22/src/test/regress'
make[1]: *** [check] Error 2
make[1]: Leaving directory `/dev/shm/portage/dev-db/postgresql-server-8.1.22/work/postgresql-8.1.22/src/test'
make: *** [check] Error 2
emake failed
* ERROR: dev-db/postgresql-server-8.1.22 failed:
* Make check failed. See above for details.
*
* Call stack:
* ebuild.sh, line 56: Called src_test
* environment, line 3335: Called die
Created attachment 255885 [details]
dev-db:postgresql-server-8.2.18:20101129-235119.log [hppa,fail]
make[3]: `refint.so' is up to date.
make[3]: `autoinc.so' is up to date.
make[3]: Leaving directory `/dev/shm/portage/dev-db/postgresql-server-8.2.18/work/postg
resql-8.2.18/contrib/spi'
rm -rf ./testtablespace
mkdir ./testtablespace
./pg_regress --temp-install=./tmp_check --top-builddir=../../.. --temp-port=55432 --sch
edule=./parallel_schedule --multibyte=SQL_ASCII --load-language=plpgsql --psqldir=/us
r/lib/postgresql-8.2/bin/
============== creating temporary installation ==============
============== initializing database system ==============
============== starting postmaster ==============
pg_regress: postmaster did not respond within 60 seconds
Examine ./log/postmaster.log for the reason
make[2]: *** [check] Error 2
make[2]: Leaving directory `/dev/shm/portage/dev-db/postgresql-server-8.2.18/work/postg
resql-8.2.18/src/test/regress'
make[1]: *** [check] Error 2
make[1]: Leaving directory `/dev/shm/portage/dev-db/postgresql-server-8.2.18/work/postg
resql-8.2.18/src/test'
make: *** [check] Error 2
emake failed
* ERROR: dev-db/postgresql-server-8.2.18 failed:
* Make check failed. See above for details.
*
* Call stack:
* ebuild.sh, line 56: Called src_test
* environment, line 3336: Called die
elmer ~ # cat postmaster.log
FATAL: could not open lock file "/var/run/postgresql/.s.PGSQL.55432.lock": Permission denied
(In reply to comment #2) > elmer ~ # cat postmaster.log > FATAL: could not open lock file "/var/run/postgresql/.s.PGSQL.55432.lock": > Permission denied Same for 8.3.12. 8.4.5 has tests restricted. Hmm, I thought the ebuild changed the location of the socket to someplace it could actually create the socket. I'm pretty sure that will fix this problem. Please advise. A security bug depends on this one. It'll be a while before I can take a look at it and propose a patch. I'm currently without Internet on my workstation. What do the postmaster.log's have to say? Okay, I think I know what the issue really is here. /var/run/postgresql/ isn't created until after the package is installed. The existence of /var/run/postgresql/ is mandatory given that the patches set that as the default socket location. So, the test will fail the first time the package is installed, but should succeed on subsequent emerges. This would explain why I haven't seen the tests fail when I gave it a go on my system and is the most likely reason as to why RESTRICT="test" is in 8.4. I'll have to dig into the source code/makefiles/whatever of the tests to see if it's even possible to change the location for just the test as it doesn't look like I can define that on the call line in src_test. Really, there are two options here: Test before install or test after install. The check can be done in pkg_postinst rather than src_test. P.S.: Bug 232174 and this are one and the same. Even if you add /var/run/postgresql/ with a+rwx, it still fails probably due to sandbox. Since you can't run the test suite as root, I used a normal unprivileged account, which also fails, but some more digging tells me that the testing process is looking for libpq.a, which doesn't exist at that point (and is a byproduct, so there is no way for make to figure it out). If you compile it by hand, the test suite still won't run under the auspices of Ebuild/Sandbox, since it still can't write to the aforementioned directory. Running without sandbox gives this error: ============== creating database "regression" ============== ./pg_regress: line 543: /usr/lib/postgresql-/bin//createdb: No such file or directory pg_regress: createdb failed make: *** [check] Error 2 At which point I give up until I find some more time - I've already wasted an afternoon at work on this. *** Bug 232174 has been marked as a duplicate of this bug. *** (In reply to comment #10) > Even if you add /var/run/postgresql/ with a+rwx, it still fails probably due to > sandbox. Since you can't run the test suite as root, I used a normal > unprivileged account, which also fails, but some more digging tells me that the > testing process is looking for libpq.a, which doesn't exist at that point (and > is a byproduct, so there is no way for make to figure it out). If you compile > it by hand, the test suite still won't run under the auspices of > Ebuild/Sandbox, since it still can't write to the aforementioned directory. > Running without sandbox gives this error: > > ============== creating database "regression" ============== > ./pg_regress: line 543: /usr/lib/postgresql-/bin//createdb: No such file or > directory > pg_regress: createdb failed > make: *** [check] Error 2 > > At which point I give up until I find some more time - I've already wasted an > afternoon at work on this. > My concern here is that "/usr/lib/postgresql-/bin//createdb" should read "/usr/lib/postgresql-9.0/bin/createdb". Something is off there. 'libpq.a' should be generated by dev-db/postgresql-base. I've gotten the tests to run using the following steps: # chmod o+rwx /var/run/postgresql # FEATURES="userpriv" ebuild postgresql-server-8.3.13-r1.ebuild test That -r1 is in my local overlay, but nothing in it effects src_test(). I think I have found the changes I can make in the source code to move the location of the socket. Until then, that chmod will have to be done manually. I've created some patches for 8.{2,3,4} and 9.0. On my machine, the regression tests have all passed successfully. (I'll pass them along to Patrick so he can do his review on the patches.) The patches avoid the need for /var/run/postgresql to exist or have its permissions relaxed. The lock file is created properly in ${S}, and forces the client/server communications through the localhost. Changes have been made to the ebuilds as well so that the test only run if ${UID} -ne 0, otherwise they're skipped gracefully. @Tobias: I actually did encounter that very issue with libpq.a being missing. I ran 'ebuild postgresql-server-8.2.19-r1.ebuild test'. I hadn't properly emerged =dev-db/postgresql-base-8.2.19. Once that had been done I didn't have any further issues. Fixed. 21 Mar 2011; Aaron W. Swenson <titanofold@gentoo.org> +postgresql-server-8.2.20-r1.ebuild, +postgresql-server-8.3.14-r1.ebuild, +postgresql-server-8.4.7-r1.ebuild, +postgresql-server-9.0.3-r1.ebuild: Fixes bugs 274836, 302384, 323683, 325709, 347005, 347223, 353687 and 353750. All slots, including 8.4 and 9.0 successfully run and pass tests here. |