]> git.ipfire.org Git - thirdparty/public-inbox.git/commit
t/imapd: workaround a Perl 5.36.0 readline regression
authorEric Wong <e@80x24.org>
Thu, 13 Jul 2023 05:39:17 +0000 (05:39 +0000)
committerEric Wong <e@80x24.org>
Thu, 13 Jul 2023 23:10:15 +0000 (23:10 +0000)
commit7234e6718e62840d94de3d04b87eee28bf5c4682
treef211ec17eb8d8bb7a7c5bcb69aa97ae484c1e2dc
parentc99ccad473d275460741ee2462dc7ccbedcb858b
t/imapd: workaround a Perl 5.36.0 readline regression

Buffered readline (and read) ops under Perl 5.36.0 fails to read
new data after writes are made by other file handles (or
processes).

To fix and improve our test, introduce a new, (currently)
test-only TailNotify class to use inotify or kevent if available
to workaround it while avoiding infinite polling loops.  Further
refinements to these test APIs since we use the same pattern for
testing daemons in many places.

This also fixes the TEST_KILL_IMAPD condition in t/imapd.t under
GNU/Linux, AFAIK that test was never reliable under FreeBSD.

Link: https://bugs.debian.org/1040947
MANIFEST
lib/PublicInbox/TailNotify.pm [new file with mode: 0644]
t/imapd.t
t/tail_notify.t [new file with mode: 0644]