]> git.ipfire.org Git - thirdparty/postgresql.git/commit
aio: Refactor tests in preparation for more tests
authorAndres Freund <andres@anarazel.de>
Thu, 26 Mar 2026 14:07:59 +0000 (10:07 -0400)
committerAndres Freund <andres@anarazel.de>
Thu, 26 Mar 2026 14:38:56 +0000 (10:38 -0400)
commit906a0469728e1dead174e0b738337f6f07a99601
tree1d3711431d1a0ae5458e201a7ff28d2606ea6839
parent47c110f77e75ed7efd54c3b152f7da2350522f8c
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@anarazel.de>
Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://postgr.es/m/zljergweqti7x67lg5ije2rzjusie37nslsnkjkkby4laqqbfw@3p3zu522yykv
src/test/modules/test_aio/meson.build
src/test/modules/test_aio/t/001_aio.pl
src/test/modules/test_aio/t/003_initdb.pl [new file with mode: 0644]
src/test/modules/test_aio/t/TestAio.pm [new file with mode: 0644]