Make AIO error test more portable
authorAndrew Dunstan <[email protected]>
Sun, 13 Apr 2025 18:39:45 +0000 (14:39 -0400)
committerAndrew Dunstan <[email protected]>
Sun, 13 Apr 2025 18:39:45 +0000 (14:39 -0400)
Alpine Linux's C library (musl) spells one error message differently.

Reported-by: Wolfgang Walther
src/test/modules/test_aio/t/001_aio.pl

index c136d8ee8f50db21561b2b5189aab518d36d670c..ef4e5247e5b1405af870941faf0b997a510c95ac 100644 (file)
@@ -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()));