tags 860602 + confirmed
tags 860602 + upstream
tags 860602 + patch
thanks

Hi,

On Wed, Apr 19, 2017 at 08:13:46AM +0200, Lucas Nussbaum wrote:
> Source: ruby-net-ldap
> Version: 0.12.1-1
> Severity: serious

Actually, this severity is questionable, the bug is not in the *build*
process, but in the *test* suite.  For the rationale, see:

  <https://lists.debian.org/871t0vzneq....@hope.eyrie.org>

> Tags: stretch sid

We tested this on a clean sid chroot as well with *no* network during
the GULL BSP:

  <http://www2.linux-gull.ch/?q=node/23>

> Relevant part (hopefully):
> > /usr/bin/ruby2.3 /usr/bin/gem2deb-test-runner
> > 
> > ┌──────────────────────────────────────────────────────────────────────────────┐
> > │ Run tests for ruby2.3 from debian/ruby-test-files.yaml                    
> >    │
> > └──────────────────────────────────────────────────────────────────────────────┘
> > 
> > RUBYLIB=/<<PKGBUILDDIR>>/debian/ruby-net-ldap/usr/lib/ruby/vendor_ruby:. 
> > GEM_PATH=debian/ruby-net-ldap/usr/share/rubygems-integration/all:/var/lib/gems/2.3.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.3.0:/usr/share/rubygems-integration/2.3.0:/usr/share/rubygems-integration/all
> >  ruby2.3 -ryaml -e YAML.load_file\(\"debian/ruby-test-files.yaml\"\).each\ 
> > \{\ \|f\|\ require\ f\ \}
> > Loaded suite -e
> > Started
> > ..............................................Deprecation warning: 
> > Net::LDAP::ConnectionRefused will be deprecated. Use Errno::ECONNREFUSED 
> > instead.
> > .Deprecation warning: Net::LDAP::ConnectionRefused will be deprecated. Use 
> > Errno::ECONNREFUSED instead.
> > Deprecation warning: Net::LDAP::ConnectionRefused will be deprecated. Use 
> > Errno::ECONNREFUSED instead.
> > Deprecation warning: Net::LDAP::ConnectionRefused will be deprecated. Use 
> > Errno::ECONNREFUSED instead.
> > Deprecation warning: Net::LDAP::ConnectionRefused will be deprecated. Use 
> > Errno::ECONNREFUSED instead.
> > F
> > ===============================================================================
> > Failure: test_unresponsive_host(TestLDAPConnection)
> > /<<PKGBUILDDIR>>/test/test_ldap_connection.rb:64:in `test_unresponsive_host'
> >      61:   end
> >      62: 
> >      63:   def test_unresponsive_host
> >   => 64:     assert_raise Net::LDAP::Error do
> >      65:       Net::LDAP::Connection.new(:host => 'test.mocked.com', :port 
> > => 636)

test.mocked.com does not respond on port 636:
=====
rescue@debian:~$ ldapsearch -x -H ldaps://test.mocked.com
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
rescue@debian:~$ 
=====

There are different solutions:

1) uncomment "export DH_RUBY_IGNORE_TESTS=all" in debian/rules

2) add "export RES_OPTIONS=attempts:0" do debian/rules, as per

     <https://lists.debian.org/20160929205427.4ormkscfms5gm...@jwilk.net>

3) comment test/test_ldap_connection.rb in debian/ruby-test-files.yaml
   (this seems the best solution)

However, even with network access and DNS resolution, the test does not
behave the same if the connection to test.mocked.com is possible or not.
This can be tested via `iptables -I OUTPUT -p tcp -m tcp -d
test.mocked.com -j $ACTION`:

* DROP, the test does not fail
* REJECT, the test fails

Nevertheless, if no one replies in 7 days, I will upload an NMU with the
solution 3 above (Git patch attached).

Thx, bye,
Gismo / Luca
>From 5e1b2c167c4608110461b10d46c91ba8bf9ee63b Mon Sep 17 00:00:00 2001
From: Luca Capello <l...@pca.it>
Date: Thu, 20 Apr 2017 23:56:23 +0200
Subject: [PATCH] debian/ruby-test-files.yaml: (#860602) comment LDAP

Signed-off-by: Luca Capello <l...@pca.it>
---
 debian/changelog            | 7 +++++++
 debian/ruby-test-files.yaml | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index d7c96dc..351daed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+ruby-net-ldap (0.12.1-2) UNRELEASED; urgency=medium
+
+  * debian/ruby-test-files:
+    + comment test/test_ldap_connection.rb (Closes: #860602).
+
+ -- 
+
 ruby-net-ldap (0.12.1-1) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/ruby-test-files.yaml b/debian/ruby-test-files.yaml
index 1db6484..d5874e5 100644
--- a/debian/ruby-test-files.yaml
+++ b/debian/ruby-test-files.yaml
@@ -1,7 +1,8 @@
 --- 
 - test/test_entry.rb
 - test/test_filter.rb
-- test/test_ldap_connection.rb
+## <https://bugs.debian.org/860602>
+#- test/test_ldap_connection.rb
 - test/test_ldif.rb
 - test/test_password.rb
 - test/test_rename.rb
-- 
2.1.4

Reply via email to