[libdevel-bt-perl] 01/03: Add a patch fixing testsuite failures on slow hosts (particularly mips).

Niko Tyni ntyni at moszumanska.debian.org
Sat Sep 27 08:15:27 UTC 2014


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

ntyni pushed a commit to branch master
in repository libdevel-bt-perl.

commit 694e07c66e7654704934e7cfb43b73bf3de5a284
Author: Niko Tyni <ntyni at debian.org>
Date:   Sat Sep 27 11:09:52 2014 +0300

    Add a patch fixing testsuite failures on slow hosts (particularly mips).
    
    This mostly fixes #721421.
---
 ...einitialize-the-fd-set-in-the-select-loop.patch | 49 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 50 insertions(+)

diff --git a/debian/patches/0001-Reinitialize-the-fd-set-in-the-select-loop.patch b/debian/patches/0001-Reinitialize-the-fd-set-in-the-select-loop.patch
new file mode 100644
index 0000000..82f7de6
--- /dev/null
+++ b/debian/patches/0001-Reinitialize-the-fd-set-in-the-select-loop.patch
@@ -0,0 +1,49 @@
+From 88d953d71051fe45a4983f1cce9810f7ae942c56 Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni at debian.org>
+Date: Sat, 27 Sep 2014 10:35:27 +0300
+Subject: [PATCH] Reinitialize the fd set in the select loop
+
+This fixes test failures on slow hosts.
+
+It looks like execvp() happening in the child after the first select()
+call invalidates the set.
+
+Quoting the Linux select_tut(2) manual page:
+
+ 11. Since  select()  modifies  its  file descriptor sets, if the call
+     is being used in a loop, then the sets must be reinitialized before
+     each call.
+
+Bug-Debian: https://bugs.debian.org/721421
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=93585
+---
+ bt.xs | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/bt.xs b/bt.xs
+index 6b9fed6..f892c8c 100644
+--- a/bt.xs
++++ b/bt.xs
+@@ -88,9 +88,6 @@ stack_trace (char **args)
+         _exit(0);
+     }
+ 
+-    FD_ZERO(&fdset);
+-    FD_SET(out_fd[0], &fdset);
+-
+     write(in_fd[1], "thread apply all backtrace\n", 27);
+     write(in_fd[1], "quit\n", 5);
+ 
+@@ -105,6 +102,9 @@ stack_trace (char **args)
+         tv.tv_sec = 1;
+         tv.tv_usec = 0;
+ 
++        FD_ZERO(&fdset);
++        FD_SET(out_fd[0], &fdset);
++
+         sel = select(FD_SETSIZE, &fdset, NULL, NULL, &tv);
+         if (sel == -1)
+             break;
+-- 
+2.1.1
+
diff --git a/debian/patches/series b/debian/patches/series
index dce6732..11e64cb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 hurd_path_max.patch
 0001-Raise-instead-of-kill-the-signal.patch
+0001-Reinitialize-the-fd-set-in-the-select-loop.patch

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



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