Re: Does PostgreSQL have complete functional test cases? - Mailing list pgsql-general

From Craig Ringer
Subject Re: Does PostgreSQL have complete functional test cases?
Date
Msg-id 509C6A5B.4090701@2ndQuadrant.com
Whole thread Raw
In response to Re: Does PostgreSQL have complete functional test cases?  (Tianyin Xu <tixu@cs.ucsd.edu>)
Responses Re: Does PostgreSQL have complete functional test cases?  (Tianyin Xu <tixu@cs.ucsd.edu>)
Re: Does PostgreSQL have complete functional test cases?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-general
On 11/09/2012 09:37 AM, Tianyin Xu wrote:
> Thanks, Craig,
>
> Yes, I know "context diff". What I don't know is whether + or - some
> rows is a big problem, let's say correctness problem. I didn't write
> the test cases so I don't know what these test cases are exactly doing.
The SQL to the test cases is right there in the regress directory,
usually with comments explaining what each test is for.

> If you tell me the failure of these test cases are severe and not
> acceptable, I'm fine with it. It means these configurations are not
> allowed.
It depends on the test. Some are testing whether the optimizer behaves
as expected, choosing a particular plan. Some tests assume rows are
being returned in a particular order, so if you change settings you can
see at a glance that while the test fails the output is actually OK.
Others are correctness tests and must produce exactly the  the expected
results.

This is generally clear from the test query and comments.
> which assigned a big number to the cpu_index_tuple_cost, affecting the
> query planner.
The planner tests are written for a particular configuration, so if you
change the configuration they won't produce the expected results. That's
OK; just make sure other tests are fine.

It'd be nice to split the tests up into clearer groups - "will fail if
planner settings are changed; WARNING", "will fail only if incorrect
result is returned; FATAL" etc. Right now, AFAIK that hasn't been done.

--
Craig Ringer


pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Does PostgreSQL have complete functional test cases?
Next
From: Tianyin Xu
Date:
Subject: Re: Does PostgreSQL have complete functional test cases?