Re: Contributing test cases to improve coverage

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: J F <jonathanfoo0523(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Contributing test cases to improve coverage
Date: 2024-06-12 18:22:47
Message-ID: 1508710.1718216567@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

J F <jonathanfoo0523(at)gmail(dot)com> writes:
> For postgres, I am looking at adding test cases to test suite in
> test/src/regress/. I have gone through (a)-(e), and managed to produced
> some test cases. As an example, I claim the test case
> ```
> CREATE RECURSIVE VIEW a(b) AS SELECT'' ;
> SELECT FROM a WHERE NULL;
> ```
> could kill the following mutation at optimizer/plan/setrefs.c, 502:5--502:33
> Original binary operator expression:
> ```
> rte->rtekind == RTE_SUBQUERY
> ````
> Replacement expression:
> ```
> (rte->rtekind) >= RTE_SUBQUERY
> ```

I am quite confused about what is the point of this. You have not
found any actual bug, nor have you demonstrated that this test case
could discover a likely future bug that wouldn't be detected another
way. Moreover, it seems like the process would lead to some very
large number of equally marginal test cases. We aren't likely to
accept such a patch, because we are concerned about keeping down the
runtime of the test suite.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2024-06-12 18:24:57 Re: Proposal for Updating CRC32C with AVX-512 Algorithm.
Previous Message Ranier Vilela 2024-06-12 18:14:33 Re: Improve the granularity of PQsocketPoll's timeout parameter?