[libdaemon-generic-perl] 01/06: Add patch to fix race condition in test suite.

gregor herrmann gregoa at debian.org
Sat Sep 17 21:50:54 UTC 2016


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libdaemon-generic-perl.

commit 75331d5d9ccbf69f8b7c3a410ef189dd1eb791a2
Author: gregor herrmann <gregoa at debian.org>
Date:   Sat Sep 17 23:45:28 2016 +0200

    Add patch to fix race condition in test suite.
    
    Thanks: Niko Tyni for the patch.
    Closes: #834960
---
 ...condition-in-the-test-suite-waiting-for-d.patch | 34 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 35 insertions(+)

diff --git a/debian/patches/0001-Fix-a-race-condition-in-the-test-suite-waiting-for-d.patch b/debian/patches/0001-Fix-a-race-condition-in-the-test-suite-waiting-for-d.patch
new file mode 100644
index 0000000..4c6c0b4
--- /dev/null
+++ b/debian/patches/0001-Fix-a-race-condition-in-the-test-suite-waiting-for-d.patch
@@ -0,0 +1,34 @@
+From 96209b5ba3df009a495da31bee8e2540c3365ec5 Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni at debian.org>
+Date: Sat, 17 Sep 2016 21:16:16 +0300
+Subject: [PATCH] Fix a race condition in the test suite waiting for daemon log
+ output
+
+There's a window where the daemon has created a log file but not yet
+written anything into it. Wait for the file to become nonempty before
+reading it to make sure we're past that window.
+
+Bug-Debian: https://bugs.debian.org/834960
+Forwarded: https://rt.cpan.org/Ticket/Display.html?id=117927
+Bug: https://rt.cpan.org/Ticket/Display.html?id=117927
+
+---
+ t/daemon.t | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/t/daemon.t b/t/daemon.t
+index 30763df..548af21 100644
+--- a/t/daemon.t
++++ b/t/daemon.t
+@@ -200,7 +200,7 @@ sub do_test
+ 	chomp($counter1);
+ 	like($counter1, qr/^\d+$/, "counter1 - $name");
+ 
+-	expect { -e "$tmp/log" };
++	expect { -s "$tmp/log" };
+ 	like(read_file("$tmp/log"), qr/START LOG/, "logged output");
+ 
+ 	expect { my @l = read_file("$tmp/log"); @l > 1 };
+-- 
+2.9.3
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9de3006
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Fix-a-race-condition-in-the-test-suite-waiting-for-d.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdaemon-generic-perl.git



More information about the Pkg-perl-cvs-commits mailing list