When I build the package by hand (without sbuild) it also fails.
The result of "make test" is like this:
-----------------------------------------------------------------------------------
make test
CC = gcc
LD = ld
LDSHARED = gcc -shared
CFLAGS = -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -fPIC
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow
-fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -Wdate-time -D_FORTIFY_SOURCE=2 -I.
-I.ext/include/x86_64-linux-gnu -I./include -I.
DLDFLAGS = -Wl,-soname,libruby-2.3.so.2.3 -Wl,-z,relro
-fstack-protector -rdynamic -Wl,-export-dynamic -fstack-protector
SOLIBS = -lpthread -lgmp -ldl -lcrypt -lm
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 5.3.1-14'
--with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-5 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 5.3.1 20160409 (Debian 5.3.1-14)
test succeeded
#964 test_thread.rb:28:in `<top (required)>': <=== THIS LINE IN
RED
5000.times{|e|
(1..2).map{
Thread.new{
}
}.each{|e|
e.join()
}
}
#=> "" (expected "5000")
stderr output is not empty <=== THIS LINE
ALSO IN RED
bootstraptest.tmp.rb:4:in `initialize': can't create Thread: Resource
temporarily unavailable (ThreadError)
from bootstraptest.tmp.rb:4:in `new'
from bootstraptest.tmp.rb:4:in `block (2 levels) in <main>'
from bootstraptest.tmp.rb:3:in `each'
from bootstraptest.tmp.rb:3:in `map'
from bootstraptest.tmp.rb:3:in `block in <main>'
from bootstraptest.tmp.rb:2:in `times'
from bootstraptest.tmp.rb:2:in `<main>'
test_thread.rb \uncommon.mk:581: recipe for target 'yes-btest-ruby'
failed
make: *** [yes-btest-ruby] Error 1
-----------------------------------------------------------------------------------
I don't know much about this, but it seems as if it was reaching some
of the limits in /etc/security/limits.conf.
By trial and error, I found that the attached patch fixes the issue in
my system, but I don't even know if the patch makes any sense.
Now the question: How could I know beforehand that the tests will work
on a given system?
Is my system really "defective" because it does not pass the tests,
or maybe the tests are asking too much?
Cc:ing Matthias, who reported this in Ubuntu in the first place.
Thanks.--- a/bootstraptest/test_thread.rb
+++ b/bootstraptest/test_thread.rb
@@ -25,8 +25,8 @@
:ok if /can't create Thread/ =~ e.message
end
}
-assert_equal %q{5000}, %q{
- 5000.times{|e|
+assert_equal %q{100}, %q{
+ 100.times{|e|
(1..2).map{
Thread.new{
}
@@ -35,13 +35,13 @@
}
}
}
-assert_equal %q{5000}, %q{
- 5000.times{|e|
+assert_equal %q{100}, %q{
+ 100.times{|e|
(1..2).map{
Thread.new{
}
}.each{|e|
- e.join(1000000000)
+ e.join(1000)
}
}
}