pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Avoid loss of code coverage with unlogged-index test cases. 2+ messages / 1 participants [nested] [flat]
* pgsql: Avoid loss of code coverage with unlogged-index test cases. @ 2022-09-25 17:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2022-09-25 17:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid loss of code coverage with unlogged-index test cases. Commit 4fb5c794e intended to add coverage of some ambuildempty methods that were not getting reached, without removing any test coverage. However, by changing a temp table to unlogged it managed to negate the intent of 4c51a2d1e, which means that we didn't have reliable test coverage of ginvacuum.c anymore. As things stand, much of that file might or might not get reached depending on timing, which seems pretty undesirable. Although this is only clearly broken for the GIN test, it seems best to revert 4fb5c794e altogether and instead add bespoke test cases covering unlogged indexes for these four AMs. We don't need to do very much with them, so the extra tests are cheap. (Note that btree, hash, and bloom already have similar test cases, so they need no additional work.) We can also undo dec8ad367. Since the testing deficiency that that hacked around was later fixed by 2f2e24d90, let's intentionally leave an unlogged table behind to improve test coverage in the modules that use the regression database for other test purposes. (The case I used also leaves an unlogged sequence behind.) Per report from Alex Kozhemyakin. Back-patch to v15 where the faulty test came in. Discussion: https://postgr.es/m/b00c8ee096ee46cd25c183125562a1a7@postgrespro.ru Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1d2fec990c4dd6da8ffe5ca6b3c2aed2553197fb Modified Files -------------- src/test/regress/expected/brin.out | 7 ++++++- src/test/regress/expected/gin.out | 11 ++++++++++- src/test/regress/expected/gist.out | 8 +++++++- src/test/regress/expected/spgist.out | 11 +++++++++-- src/test/regress/sql/brin.sql | 8 +++++++- src/test/regress/sql/gin.sql | 12 +++++++++++- src/test/regress/sql/gist.sql | 9 ++++++++- src/test/regress/sql/spgist.sql | 12 ++++++++++-- 8 files changed, 68 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Avoid loss of code coverage with unlogged-index test cases. @ 2022-09-25 17:10 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2022-09-25 17:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Avoid loss of code coverage with unlogged-index test cases. Commit 4fb5c794e intended to add coverage of some ambuildempty methods that were not getting reached, without removing any test coverage. However, by changing a temp table to unlogged it managed to negate the intent of 4c51a2d1e, which means that we didn't have reliable test coverage of ginvacuum.c anymore. As things stand, much of that file might or might not get reached depending on timing, which seems pretty undesirable. Although this is only clearly broken for the GIN test, it seems best to revert 4fb5c794e altogether and instead add bespoke test cases covering unlogged indexes for these four AMs. We don't need to do very much with them, so the extra tests are cheap. (Note that btree, hash, and bloom already have similar test cases, so they need no additional work.) We can also undo dec8ad367. Since the testing deficiency that that hacked around was later fixed by 2f2e24d90, let's intentionally leave an unlogged table behind to improve test coverage in the modules that use the regression database for other test purposes. (The case I used also leaves an unlogged sequence behind.) Per report from Alex Kozhemyakin. Back-patch to v15 where the faulty test came in. Discussion: https://postgr.es/m/b00c8ee096ee46cd25c183125562a1a7@postgrespro.ru Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7a84c35fe6dcec62c95d023ad057e5717d9304a1 Modified Files -------------- src/test/regress/expected/brin.out | 7 ++++++- src/test/regress/expected/gin.out | 11 ++++++++++- src/test/regress/expected/gist.out | 8 +++++++- src/test/regress/expected/spgist.out | 11 +++++++++-- src/test/regress/sql/brin.sql | 8 +++++++- src/test/regress/sql/gin.sql | 12 +++++++++++- src/test/regress/sql/gist.sql | 9 ++++++++- src/test/regress/sql/spgist.sql | 12 ++++++++++-- 8 files changed, 68 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-09-25 17:10 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-09-25 17:10 pgsql: Avoid loss of code coverage with unlogged-index test cases. Tom Lane <tgl@sss.pgh.pa.us> 2022-09-25 17:10 pgsql: Avoid loss of code coverage with unlogged-index test cases. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox