test_aio: Add read_stream test infrastructure & tests While we have a lot of indirect coverage of read streams, there are corner cases that are hard to test when only indirectly controlling and observing the read stream. This commit adds an SQL callable SRF interface for a read stream and uses that in a few tests.
To make some of the tests possible, the injection point infrastructure in test_aio had to be expanded to allow blocking IO completion. While at it, fix a wrong debug message in inj_io_short_read_hook(). 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/1f6f200cab67e67f1c20d9c9ca5013e0f23f51e4 Modified Files -------------- src/test/modules/test_aio/meson.build | 1 + src/test/modules/test_aio/t/004_read_stream.pl | 278 ++++++++++++++++++++ src/test/modules/test_aio/test_aio--1.0.sql | 19 +- src/test/modules/test_aio/test_aio.c | 340 +++++++++++++++++++++---- src/tools/pgindent/typedefs.list | 1 + 5 files changed, 587 insertions(+), 52 deletions(-)
