Bug 428336 - test-suite produces failures
Summary: test-suite produces failures
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rh-postgresql
Version: 3.9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Tom Lane
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-01-10 22:09 UTC by Jan Hutař
Modified: 2013-07-03 03:17 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-16 00:55:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2008-01-10 22:09:13 UTC
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):
rh-postgresql-7.3.21-1


How reproducible:
always


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\/'/" 
pg_regress.sh":
$ 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

Else:
======================================================
 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 22:02:44 UTC
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-16 00:55:05 UTC
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.