From: | Greg Stark <stark(at)mit(dot)edu> |
---|---|
To: | Noah Misch <noah(at)leadboat(dot)com> |
Cc: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Test code is worth the space |
Date: | 2015-08-18 13:03:19 |
Message-ID: | CAM-w4HMd8=H8BoDraUXE8jPcPfaTstyzKv=d85B=YKmLnGqXBw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Aug 18, 2015 at 6:57 AM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> My own position is based on having maintained a pg_regress suite an order of
> magnitude larger than that. I don't know why that outcome was so different.
Comparing the size of test suites by these numbers is impossible
because people put more or fewer tests in each schedule file. I would
be more interested in the run-time as a metric but even that is
fallible as I've seen individual tests that took 30min to run.
And does your pg_regress test suite actually find many bugs or does it
mainly detect when functionality has changed and require updating
expected results to match?
>> 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.
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2015-08-18 13:16:00 | Re: Test code is worth the space |
Previous Message | Robert Haas | 2015-08-18 12:48:42 | Re: allowing wal_level change at run time |