Re: Regression testing for psql

From: alvherre <alvherre(at)commandprompt(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Regression testing for psql
Date: 2010-05-26 19:52:29
Message-ID: 1274902934-sup-5609@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from Stephen Frost's message of mié may 26 15:19:59 -0400 2010:
> * Robert Haas (robertmhaas(at)gmail(dot)com) wrote:
> > Then, too, there's the fact that many of these tests fail on my
> > machine because my username is not sfrost,
>
> I've updated the patch to address this, it's again at:
> http://snowman.net/~sfrost/psql-regress-help.patch

Isn't this kind of test a pain to maintain? If somebody add a new SQL
command, it will affect the entire \h output and she'll have to either
apply the changes without checking them, or manually check the complete
list. I have only to add a new function to make the test fail ...

Also, having to exclude tests that mention the database owner means that
you're only testing a fraction of the commands, so any possible problem
has a large chance of going undetected. I mean, if we're going to test
this kind of thing, shouldn't we be using something that allows us to
ignore the db owner name? A simple wildcard in place of the owner name
would suffice ... or do we need a regex for some other reason?

The \h output normally depends on terminal width. Have you handled that
somehow?

(And if we want something like this, I think we should not have a single
huge file for the complete test, but a set of smaller files. I'd even
put the bunch in src/bin/psql/regress rather than the main regress dir.)

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2010-05-26 20:11:50 Re: Exposing the Xact commit order to the user
Previous Message Robert Haas 2010-05-26 19:47:25 Re: [PATCH] Add _PG_init to PL language handler documentation