Re: Test code is worth the space - Mailing list pgsql-hackers

From David Fetter
Subject Re: Test code is worth the space
Date
Msg-id 20150818131600.GB18054@fetter.org
Whole thread Raw
In response to Re: Test code is worth the space  (Greg Stark <stark@mit.edu>)
Responses Re: Test code is worth the space  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On Tue, Aug 18, 2015 at 02:03:19PM +0100, Greg Stark wrote:
> On Tue, Aug 18, 2015 at 6:57 AM, Noah Misch <noah@leadboat.com> wrote:

> >> I suspect any effort to significantly improve Postgres test
> >> coverage is doomed until there's an alternative to pg_regress.
> >
> > There is the src/test/perl/TestLib.pm harness.
> 
> Sadly I think the test suite is only half the battle. The coding
> style of Postgres predates modern test suite systems and makes it
> hard to test. Most functions require a specific environment set up
> that would be laborious and difficult to do in any sane way. Even
> something as self-contained as tuplesort would be difficult to test
> without the whole operator class and syscache mechanisms initialized
> and populated. And that's an easy case, imagine trying to test
> individual functions in the planner without doing a complete planner
> run on a query.

I'm given to understand that this tight coupling is necessary for
performance.  Are you saying that it could be unwound, or that testing
strategies mostly need to take it into account, or...?

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Test code is worth the space
Next
From: Robert Haas
Date:
Subject: Re: Autonomous Transaction is back