mattn / mruby-uv

interface to libuv for mruby(experimental)
http://mattn.kaoriya.net/
92 stars 25 forks source link

Test failed on no IPv6 Debian GNU/Linux #75

Open nishidayuya opened 7 years ago

nishidayuya commented 7 years ago

Normal (IPv6 enabled) Debian GNU/Linux works fine, but test on IPv6 disabled one is failed.

Setup and my environment

% VBoxManage --version
4.3.36_Debianr105129
% vagrant --version
Vagrant 1.9.7
% cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "debian/stretch64"
  if Vagrant.has_plugin?("vagrant-cachier")
    config.cache.disable!
  end
  config.vm.provision(:shell, inline: <<-SHELL)
set -xe

export DEBIAN_FRONTEND=noninteractive
apt-get update

cat > /etc/sysctl.d/50-disable_ipv6.conf <<EOS
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.all.disable_ipv6 = 1
EOS
sysctl --system

apt-get install -y ruby git build-essential bison curl automake libtool
cd ~vagrant/
sudo -u vagrant git clone https://github.com/mruby/mruby.git
sudo -u vagrant tee build_config.rb > /dev/null <<EOS
MRuby::Build.new do |conf|
  toolchain(:gcc)
  enable_debug
  enable_test
  gem(core: "mruby-print")
  gem(core: "mruby-sprintf")
  gem(core: "mruby-time")
  gem(mgem: "mruby-uv")
end
EOS

for i in master 1.2.0
do
  (cp -a mruby mruby-$i
   cd mruby-$i
   sudo -u vagrant git checkout $i
   cp -a ../build_config.rb .
   sudo -u vagrant ./minirake all) &
done
wait
  SHELL
end
% vagrant up && vagrant ssh
...
vagrant@stretch:~$ cd ~/mruby-master/
vagrant@stretch:~/mruby-master$ git rev-parse HEAD
7b88c1a8e5e7316c1ddad6fc63c2a90678a146fc
vagrant@stretch:~/mruby-master$ cd build/mrbgems/mruby-uv/
vagrant@stretch:~/mruby-master/build/mrbgems/mruby-uv$ git rev-parse HEAD
25775c934d3030b9f26d0ce5220eadbadaca570f

Run test

master

vagrant@stretch:~/mruby-master/build/mrbgems/mruby-uv$ cd ~/mruby-master/
vagrant@stretch:~/mruby-master$ ./minirake test
(in /home/vagrant/mruby-master)
GEN   *.rb -> build/host/mrbgems/mruby-test/mrbtest.c
CC    build/host/mrbgems/mruby-test/mrbtest.c -> build/host/mrbgems/mruby-test/mrbtest.o
LD    build/host/bin/mrbtest

Build summary:

================================================
      Config Name: host
 Output Directory: build/host
         Binaries: mrbc, mrbtest
    Included Gems:
             mruby-print - standard print/puts/p
             mruby-sprintf - standard Kernel#sprintf method
             mruby-time - standard Time class
             mruby-uv - libuv mruby binding
             mruby-compiler - mruby compiler library
             mruby-bin-mrbc - mruby compiler executable
             mruby-test - mruby test
================================================

>>> Test host <<<
mrbtest - Embeddable Ruby Test

...........................................................................................XXXXX....................................................................?..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
UVError: UV::UDP server/client => address not available (mrbgems: mruby-uv)
UVError: UV::Prepare, UV::Check => resource busy or locked (mrbgems: mruby-uv)
UVError: UV::Idle => resource busy or locked (mrbgems: mruby-uv)
UVError: UV::TCP IPv6 server/client => address not available (mrbgems: mruby-uv)
UVError: Process => address not available (mrbgems: mruby-uv)
Skip: Module#prepend super in alias  super does not currently work in aliased methods
Total: 710
   OK: 705
   KO: 0
Crash: 5
 Time: 0.46 seconds
rake aborted!
Command Failed: ["build/host/bin/mrbtest"]
Rakefile:123:in `block (2 levels) in <top (required)>'

1.2.0

vagrant@stretch:~/mruby-master$ cd ~/mruby-1.2.0/
vagrant@stretch:~/mruby-1.2.0$ ./minirake test
(in /home/vagrant/mruby-1.2.0)

Build summary:

================================================
      Config Name: host
 Output Directory: build/host
         Binaries: mrbc, mrbtest
    Included Gems:
             mruby-print - standard print/puts/p
             mruby-sprintf - standard Kernel#sprintf method
             mruby-time - standard Time class
             mruby-uv - libuv mruby binding
             mruby-compiler - mruby compiler library
             mruby-bin-mrbc - mruby compiler executable
             mruby-test - mruby test
================================================

>>> Test host <<<
mrbtest - Embeddable Ruby Test

........................................................?..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................XXXXX
Skip: Module#prepend super in alias  super does not currently work in aliased methods
UVError: UV::UDP server/client => address not available (mrbgems: mruby-uv)
UVError: UV::Prepare, UV::Check => resource busy or locked (mrbgems: mruby-uv)
UVError: UV::Idle => resource busy or locked (mrbgems: mruby-uv)
UVError: UV::TCP IPv6 server/client => address not available (mrbgems: mruby-uv)
UVError: Process => address not available (mrbgems: mruby-uv)
Total: 663
   OK: 658
   KO: 0
Crash: 5
 Time: 0.15 seconds
rake aborted!
Command Failed: ["build/host/bin/mrbtest"]
Rakefile:119:in `block (2 levels) in <top (required)>'
mattn commented 7 years ago

Is this an issue related on your environment? If true, I'll disable or skip the test of IPv6.

nishidayuya commented 7 years ago

Yes. I have legacy system. :sweat_smile:

If true, I'll disable or skip the test of IPv6.

It's good news for me.

take-cheeze commented 6 years ago

This problem occurs too on docker systems that is mostly IPv6 disabled environment.