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 <[email protected]>
Reviewed-by: Nazir Bilal Yavuz <[email protected]>
Reviewed-by: Melanie Plageman <[email protected]>
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(-)

Reply via email to