| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: aio: Refactor tests in preparation for more tests |
| Date: | 2026-03-26 14:47:46 |
| Message-ID: | E1w5lzt-001YUw-2b@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
aio: Refactor tests in preparation for more tests
In a future commit more AIO related tests are due to be introduced. However
001_aio.pl already is fairly large.
This commit introduces a new TestAio package with helpers for writing AIO
related tests. Then it uses the new helpers to simplify the existing
001_aio.pl by iterating over all supported io_methods. This will be
particularly helpful because additional methods already have been submitted.
Additionally this commit splits out testing of initdb using a non-default
method into its own test. While that test is somewhat important, it's fairly
slow and doesn't break that often. For development velocity it's helpful for
001_aio.pl to be faster.
While particularly the latter could benefit from being its own commit, it
seems to introduce more back-and-forth than it's worth.
Author: Andres Freund <andres(at)anarazel(dot)de>
Reviewed-by: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Reviewed-by: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Discussion: https://postgr.es/m/zljergweqti7x67lg5ije2rzjusie37nslsnkjkkby4laqqbfw@3p3zu522yykv
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/906a0469728e1dead174e0b738337f6f07a99601
Modified Files
--------------
src/test/modules/test_aio/meson.build | 1 +
src/test/modules/test_aio/t/001_aio.pl | 141 +++++++++---------------------
src/test/modules/test_aio/t/003_initdb.pl | 71 +++++++++++++++
src/test/modules/test_aio/t/TestAio.pm | 90 +++++++++++++++++++
4 files changed, 204 insertions(+), 99 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-03-26 15:37:02 | pgsql: Add labels to help make psql's hidden queries more understandabl |
| Previous Message | Robert Haas | 2026-03-26 14:38:02 | pgsql: Respect disabled_nodes in fix_alternative_subplan. |