old_snapshot: add test for coverage
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t46365psql -h localhost -U postgresBuilt from patchset v1 (message #1), September 20, 2026 at 05:47 AM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t46365_1 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t46365_1 && git checkout t46365_1Patchset v1 (message #1) is on t46365_1
Dong Wook Lee <sh95119@gmail.com> writes:
I wrote a test of the old_snapshot extension for coverage.
Hmm, does this really provide any meaningful coverage? The test
sure looks like it's not doing much.
I spent some time a week or so ago trying to graft testing of
contrib/old_snapshot into src/test/modules/snapshot_too_old.
I didn't come up with anything I liked, but I still think
that that might lead to a more thorough test than a standalone
exercise.
regards, tom lane
On 8 Aug 2022, at 07:37, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Dong Wook Lee <sh95119@gmail.com> writes:
I wrote a test of the old_snapshot extension for coverage.
Hmm, does this really provide any meaningful coverage? The test
sure looks like it's not doing much.
Looking at this I agree, this test doesn't provide enough to be of value and
the LIMIT 0 might even hide bugs under a postive test result. I think we
should mark this entry RwF.
--
Daniel Gustafsson https://vmware.com/
On Mon, Aug 8, 2022 at 2:37 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Dong Wook Lee <sh95119@gmail.com> writes:
I wrote a test of the old_snapshot extension for coverage.
Hmm, does this really provide any meaningful coverage? The test
sure looks like it's not doing much.
Previously written tests were simply test codes to increase coverage.
Therefore, we can make a better test.
I'll think about it by this week. If this work exceeds my ability, I
will let you know by reply.
It's okay that the issue should be closed unless I write a meaningful test.
---
Regards,
DongWook Lee.