pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: aio: Refactor tests in preparation for more tests
Date: Thu, 26 Mar 2026 14:47:46 +0000
Message-ID: <E1w5lzt-001YUw-2b@gemulon.postgresql.org> (raw)

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

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(-)



Message-ID: <E1w5lzt-001YUw-2b@gemulon.postgresql.org>
Permalink:  ../E1w5lzt-001YUw-2b@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w5lzt-001YUw-2b@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: aio: Refactor tests in preparation for more tests
  In-Reply-To: <E1w5lzt-001YUw-2b@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox