tests for client programs

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: tests for client programs
Date: 2014-01-29 21:43:47
Message-ID: CAFj8pRDVnRHACHxNrFGmCdJe6+pRNzpekoUVDabeavoEZ=D1Sw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

I am looking on this patch.

It is great idea, and I am sure, so we want this patch - it was requested
and proposed more time.

Some tips:

a) possibility to test only selected tests
b) possibility to verify generated file against expected file
c) detection some warnings (expected/unexpected)

p.s. some tests fails when other Postgres is up. It should be checked on
start.and raise warning or stop testing.

Regards

Pavel

ok 4 - pg_ctl initdb
waiting for server to start....LOG: could not bind IPv6 socket: Address
already in use
HINT: Is another postmaster already running on port 5432? If not, wait a
few seconds and retry.
LOG: could not bind IPv4 socket: Address already in use
HINT: Is another postmaster already running on port 5432? If not, wait a
few seconds and retry.
WARNING: could not create listen socket for "localhost"
FATAL: could not create any TCP/IP sockets
.... stopped waiting
pg_ctl: could not start server
Examine the log output.
not ok 5 - pg_ctl start -w

# Failed test 'pg_ctl start -w'
# at
/home/pavel/src/postgresql/src/bin/pg_ctl/../../../src/test/perl/TestLib.pm
line 89.
waiting for server to start....LOG: could not bind IPv6 socket: Address
already in use
HINT: Is another postmaster already running on port 5432? If not, wait a
few seconds and retry.
LOG: could not bind IPv4 socket: Address already in use
HINT: Is another postmaster already running on port 5432? If not, wait a
few seconds and retry.
WARNING: could not create listen socket for "localhost"
FATAL: could not create any TCP/IP sockets
.... stopped waiting
pg_ctl: could not start server
Examine the log output.
not ok 6 - second pg_ctl start succeeds

# Failed test 'second pg_ctl start succeeds'
# at
/home/pavel/src/postgresql/src/bin/pg_ctl/../../../src/test/perl/TestLib.pm
line 89.
pg_ctl: PID file
"/home/pavel/src/postgresql/src/bin/pg_ctl/testf2KW/data/postmaster.pid"
does not exist
Is server running?
not ok 7 - pg_ctl stop -w

# Failed test 'pg_ctl stop -w'
# at
/home/pavel/src/postgresql/src/bin/pg_ctl/../../../src/test/perl/TestLib.pm
line 89.
ok 8 - second pg_ctl stop fails
pg_ctl: PID file
"/home/pavel/src/postgresql/src/bin/pg_ctl/testf2KW/data/postmaster.pid"
does not exist
Is server running?
starting server anyway
pg_ctl: could not read file
"/home/pavel/src/postgresql/src/bin/pg_ctl/testf2KW/data/postmaster.opts"
not ok 9 - pg_ctl restart with server not running

# Failed test 'pg_ctl restart with server not running'
# at
/home/pavel/src/postgresql/src/bin/pg_ctl/../../../src/test/perl/TestLib.pm
line 89.
pg_ctl: PID file
"/home/pavel/src/postgresql/src/bin/pg_ctl/testf2KW/data/postmaster.pid"
does not exist
Is server running?
starting server anyway
pg_ctl: could not read file
"/home/pavel/src/postgresql/src/bin/pg_ctl/testf2KW/data/postmaster.opts"
not ok 10 - pg_ctl restart with server running

# Failed test 'pg_ctl restart with server running'
# at
/home/pavel/src/postgresql/src/bin/pg_ctl/../../../src/test/perl/TestLib.pm
line 89.
pg_ctl: PID file
"/home/pavel/src/postgresql/src/bin/pg_ctl/testf2KW/data/postmaster.pid"
does not exist
Is server running?
Bailout called. Further testing stopped: system pg_ctl stop -D
/home/pavel/src/postgresql/src/bin/pg_ctl/testf2KW/data -m fast failed: 256
Bail out! system pg_ctl stop -D
/home/pavel/src/postgresql/src/bin/pg_ctl/testf2KW/data -m fast failed: 256
FAILED--Further testing stopped: system pg_ctl stop -D
/home/pavel/src/postgresql/src/bin/pg_ctl/testf2KW/data -m fast failed: 256
make[1]: *** [check] Error 255
make[1]: Leaving directory `/home/pavel/src/postgresql/src/bin/pg_ctl'
make: *** [check-pg_ctl-recurse] Error 2
make: Leaving directory `/home/pavel/src/postgresql/src/bin'

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2014-01-29 21:56:38 Re: jsonb and nested hstore
Previous Message Andrew Dunstan 2014-01-29 21:32:30 Re: Add min and max execute statement time in pg_stat_statement