[DRE-maint] Bug#860602: ruby-net-ldap: FTBFS: ERROR: Test "ruby2.3" failed.

Luca Capello luca at pca.it
Thu Apr 20 22:10:42 UTC 2017


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.fsf@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 at debian:~$ ldapsearch -x -H ldaps://test.mocked.com
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
rescue at 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.4ormkscfms5gmprp@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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debian-ruby-test-files.yaml-860602-comment-LDAP.patch
Type: text/x-diff
Size: 1175 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20170421/05136cb1/attachment.patch>


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