aio: Refactor tests in preparation for more tests
Andres Freund <andres@anarazel.de>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/test/modules/test_aio/meson.build | modified | +1 −0 |
| src/test/modules/test_aio/t/001_aio.pl | modified | +42 −99 |
| src/test/modules/test_aio/t/003_initdb.pl | added | +71 −0 |
| src/test/modules/test_aio/t/TestAio.pm | added | +90 −0 |
Discussion
- Don't synchronously wait for already-in-progress IO in read stream 33 messages · 2025-09-11 → 2026-03-31