[DRE-commits] [ruby-kgio] 04/04: read /proc/sys/net/ipv4/tcp_fastopen only if it exists

Antonio Terceiro terceiro at moszumanska.debian.org
Mon Feb 22 13:10:38 UTC 2016


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

terceiro pushed a commit to branch master
in repository ruby-kgio.

commit 02622dec4b617a0d53b740646393f6ac0cf0e921
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Mon Feb 22 08:40:40 2016 -0300

    read /proc/sys/net/ipv4/tcp_fastopen only if it exists
---
 debian/changelog                           |  2 ++
 debian/patches/fix-tcp-fastopen-test.patch | 19 +++++++++++++++++++
 debian/patches/series                      |  1 +
 3 files changed, 22 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index fad1e2a..ac35372 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ ruby-kgio (2.10.0-1) unstable; urgency=medium
   * Team upload
   * New upstream release
   * Update packaging with a new dh-make-ruby run
+  * debian/patches/fix-tcp-fastopen-test.patch: don't try to read
+    /proc/sys/net/ipv4/tcp_fastopen before checking if it exists.
 
  -- Antonio Terceiro <terceiro at debian.org>  Sun, 21 Feb 2016 21:03:20 -0300
 
diff --git a/debian/patches/fix-tcp-fastopen-test.patch b/debian/patches/fix-tcp-fastopen-test.patch
new file mode 100644
index 0000000..5d24703
--- /dev/null
+++ b/debian/patches/fix-tcp-fastopen-test.patch
@@ -0,0 +1,19 @@
+Description: check is tcp_fastopen exists before trying to read it
+ At least on LXC containers on my system, /proc/sys/net/ipv4/tcp_fastopen does
+ not exist.
+Author: Antonio Terceiro <terceiro at debian.org>
+Origin: vendor
+Last-Update: 2016-02-22
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/test/test_tfo.rb
++++ b/test/test_tfo.rb
+@@ -10,7 +10,7 @@ class TestTFO < Test::Unit::TestCase
+   end
+ 
+   def fastopen_ok?
+-    if RUBY_PLATFORM =~ /linux/
++    if RUBY_PLATFORM =~ /linux/ && File.exist?("/proc/sys/net/ipv4/tcp_fastopen")
+       tfo = File.read("/proc/sys/net/ipv4/tcp_fastopen").to_i
+       client_enable = 1
+       server_enable = 2
diff --git a/debian/patches/series b/debian/patches/series
index 04704ca..979b54e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 fix-test-test_default_wait
+fix-tcp-fastopen-test.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-kgio.git



More information about the Pkg-ruby-extras-commits mailing list