Bug 428336 - test-suite produces failures
test-suite produces failures
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rh-postgresql (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Tom Lane
Depends On:
  Show dependency treegraph
Reported: 2008-01-10 17:09 EST by Jan Hutař
Modified: 2013-07-02 23:17 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-15 19:55:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Hutař 2008-01-10 17:09:13 EST
Description of problem:
I'm not able to run test-suite (in package rh-postgresql-test). When I fix the 
problem and run the test-suite, I get 20 of 124 tests failed.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. # rm -rf /var/lib/pgsql/data/ /etc/sysconfig/pgsql/postgresql
2. # service rhdb start
3. # su - postgres
4. $ cd /usr/lib/pgsql/test/regress
5. $ sed -i "s/bindir='@bindir@'/bindir='\/usr\/bin\/'/" pg_regress.sh
6. $ chmod +x pg_regress.sh
7. $ time ./pg_regress.sh --schedule=parallel_schedule

Actual results:
Without "5. $ sed -i "s/bindir='@bindir@'/bindir='\/usr\/bin\/'/" 
$ time ./pg_regress.sh --schedule=parallel_schedule
(using postmaster on Unix socket, default port)
============== dropping database "regression"         ==============
./pg_regress.sh: line 414: @bindir@/dropdb: No such file or directory
============== creating database "regression"         ==============
./pg_regress.sh: line 454: @bindir@/createdb: No such file or directory
pg_regress.sh: createdb failed

Without "6. $ chmod +x pg_regress.sh"
$ time ./pg_regress.sh --schedule=parallel_schedule
-bash: ./pg_regress.sh: Permission denied

 21 of 124 tests failed, 2 of these failures ignored.

Expected results:
All 124 tests passed.

Additional info:
Discovered while testing "RHSA-2008:0039-04 - Moderate: postgresql security 
update": http://errata.devel.redhat.com/errata/show/6744
This would probably not be fixed, so reported just for record.
Comment 1 Tom Lane 2010-05-07 18:02:44 EDT
Steps 5 and 6 are inappropriate.  The RPM already provides a correctly-constructed pg_regress script, and what you did here didn't duplicate it accurately.

The correct way to run the tests would be just

./pg_regress --schedule=parallel_schedule --multibyte=SQL_ASCII

(or use serial_schedule if you prefer).  When I do that after allowing "service rhdb start" to have done its thing blindly, I get one failure: a row-ordering difference in the select_having test.  This looks to be because I allowed the initdb to happen in en_US locale instead of C locale.  The Postgres 7.3 regression tests were not constructed to succeed in any but C locale.

I'd be the first to agree that this is all pretty user-unfriendly, of course.  Later versions of the RPMs have better documentation as well as a Makefile that's more appropriate to the user's needs here.  But I rather doubt we'll bother to go back and fix that in RHEL3.
Comment 2 Tom Lane 2010-11-15 19:55:05 EST
Since RHEL3 is now effectively EOL, this is not going to get fixed.

Note You need to log in before you can comment on or make changes to this bug.