Bug#834960: libdaemon-generic-perl: FTBFS too much often (failing tests)

Niko Tyni ntyni at debian.org
Sat Sep 17 18:27:33 UTC 2016


On Sat, Sep 17, 2016 at 07:20:09PM +0200, gregor herrmann wrote:

> CPAN RT has one issue; don't know if it's related:
> https://rt.cpan.org/Public/Bug/Display.html?id=110239

I think it's a different issue.

> From starting at t/daemon.t my guess is that we're seeing a race
> condition or some other timing issue here -- the daemon writes to a
> log file and the test reads the logfile, and in one case the log
> message doesn't seem to be there (yet?). At least that's my current
> guess.

Indeed, the daemon first opens the file for writing and only then writes
it (see the logger script at top of daemon.t), while the test waits for
existence (-e) and then proceeds to check the file contents.

I think the attached patch should fix it. I was able to reproduce
the issue sporadically without the patch, and couldn't get it to
happen after applying this.

> I'm tempted to mark this log-reading test as TODO since this seems a
> bit fragile.

No objections, but let's try the patch first?
-- 
Niko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-a-race-condition-in-the-test-suite-waiting-for-d.patch
Type: text/x-diff
Size: 924 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20160917/1967429c/attachment.patch>


More information about the pkg-perl-maintainers mailing list