On 2025-04-12 Sa 10:10 PM, Noah Misch wrote:
On Sat, Apr 12, 2025 at 07:51:06PM +0200, Wolfgang Walther wrote:
With injection points enabled, I get the following errors in test_aio:
[15:14:45.408](0.000s) not ok 187 - worker: first hard IO error is reported:
expected stderr
[15:14:45.409](0.000s)
[15:14:45.409](0.000s) # Failed test 'worker: first hard IO error is
reported: expected stderr'
# at t/001_aio.pl line 810.
[15:14:45.409](0.000s) # 'psql:<stdin>:88: ERROR: could
not read blocks 2..2 in file "base/5/16408": I/O error'
# doesn't match '(?^:ERROR:.*could not read blocks 2\.\.2 in file
\"base/.*\": Input/output error)'
It seems like it's just the error message that is different and has "I/O"
instead of "Input/output"?
Looks like it.
On a more general note, does enabling injection points make any sense here?
Yes, it does.
I see that coverage in the build farm is not very big. IIUC, those are a
development tool, so might not be relevant, because nobody is developing on
Alpine / musl?
No, whether anyone develops on the platform is not a factor. One hasn't fully
tested PostgreSQL until one builds with injection points.
Here's a simple fix ... also removes some unnecessary escaping and
leaning toothpick syndrome.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
diff --git a/src/test/modules/test_aio/t/001_aio.pl b/src/test/modules/test_aio/t/001_aio.pl
index c136d8ee8f5..ef4e5247e5b 100644
--- a/src/test/modules/test_aio/t/001_aio.pl
+++ b/src/test/modules/test_aio/t/001_aio.pl
@@ -813,7 +813,7 @@ SELECT invalidate_rel_block('tbl_ok', 2);
"first hard IO error is reported",
qq(SELECT count(*) FROM tbl_ok),
qr/^$/,
- qr/ERROR:.*could not read blocks 2\.\.2 in file \"base\/.*\": Input\/output error/
+ qr!ERROR:.*could not read blocks 2\.\.2 in file "base/.*": (?:I/O|Input/output) error!
);
psql_like(
@@ -822,7 +822,7 @@ SELECT invalidate_rel_block('tbl_ok', 2);
"second hard IO error is reported",
qq(SELECT count(*) FROM tbl_ok),
qr/^$/,
- qr/ERROR:.*could not read blocks 2\.\.2 in file \"base\/.*\": Input\/output error/
+ qr!ERROR:.*could not read blocks 2\.\.2 in file "base/.*": (?:I/O|Input/output) error!
);
$psql->query_safe(qq(SELECT inj_io_short_read_detach()));