Bug#848408: libapp-termcast-perl: FTBFS randomly (failing tests)

Niko Tyni ntyni at debian.org
Wed Dec 28 21:07:14 UTC 2016


Control: tag -1 patch

On Sat, Dec 17, 2016 at 01:10:42PM +0100, Santiago Vila wrote:
> Package: src:libapp-termcast-perl
> Version: 0.13-2
> Severity: serious

> #   Failed test 'sent the right data to the server'
> #   at t/read-write.t line 88.
> # '
> #   Failed test at t/read-write.t line 61.
> #          got: undef
> #     expected: '
> 
> # '
> # Looks like you failed 2 tests of 5.

I can reproduce this in a single CPU virtual machine, running
the test case in a loop.

The process at the bottom of the stack is running 

 perl -ple 'last if /^\$/'

and it looks like the race is between this process exiting and its parent
(IO::Pty::Easy) having enough time to read the last echoed newline.

Unfortunately it goes away with 'strace -f', so I don't have the full
analysis, but the attached script reliably fixes it for me.
-- 
Niko Tyni   ntyni at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-a-race-condition-in-t-read-write.t.patch
Type: text/x-diff
Size: 1158 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20161228/2c419121/attachment.patch>


More information about the pkg-perl-maintainers mailing list