https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8005

            Bug ID: 8005
           Summary: t/timeout.t fails on Windows
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Hardware: PC
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Regression Tests
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: Undefined

Tests in timeout.t that expect a timeout fail when run in Windows. This was
confirmed using both Strawberry Perl and ActiveState Perl versions 5.34 on
Windows 10.

Analysis: timeout.t has a function mysleep() that uses select() to emulate a
sleep that does not interfere with SpamAssassin::Timeout's use of alarms. From
https://perldoc.perl.org/functions/sleep "You probably cannot mix alarm and
sleep calls, because sleep is often implemented using alarm."

However, as explained in https://www.perlmonks.org/?node_id=1127475 about
Strawberry Perl, and also seems to hold for ActiveState on Windows, the
implementation of alarms has to be different from that on Linux, resulting in
it 1) being compatible with sleep(), and 2) being incompatible with the use of
external system calls as done by the select() emulation of sleep.

The fix for timeout.t seems to be using select() in  mysleep() only in
non-Windows, and to have it call sleep() when in Windows.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to