[Ruby 1.9 - Bug #5021][Open] test_empty(DL::TestCFunc): DL::DLError: unknown symbol "strcpy"

Issue #5021 has been reported by Makoto K…


Bug #5021: test_empty(DL::TestCFunc): DL::DLError: unknown symbol
“strcpy”

Author: Makoto K.
Status: Open
Priority: Low
Assignee:
Category:
Target version: 1.9.x
ruby -v: ruby 1.9.3dev (2011-07-10) [x86_64-freebsd8.2]

手元の環境(FreeBSD 8.2 STABLE)で、
make test-all TESTS=‘-n test_empty dl/test_cfunc.rb
open-uri/test_open-uri.rb’
のようにして test-all を実行すると、DL::TestCFunc の test_empty で以下のようにエラーが起きます

$ make test-all TESTS=‘-n test_empty dl/test_cfunc.rb
open-uri/test_open-uri.rb’
./miniruby -I…/ruby-git/lib -I. -I.ext/common
…/ruby-git/tool/runruby.rb --extout=.ext – --disable-gems
“…/ruby-git/test/runner.rb” --ruby=“./miniruby -I…/ruby-git/lib -I.
-I.ext/common …/ruby-git/tool/runruby.rb --extout=.ext –
–disable-gems” -n test_empty dl/test_cfunc.rb open-uri/test_open-uri.rb
Run options: “–ruby=./miniruby -I…/ruby-git/lib -I. -I.ext/common
…/ruby-git/tool/runruby.rb --extout=.ext – --disable-gems” -n
test_empty

Running tests:

.E

Finished tests in 0.002551s, 784.1563 tests/s, 0.0000 assertions/s.

  1. Error:
    test_empty(DL::TestCFunc):
    DL::DLError: unknown symbol “strcpy”
    /export/home/ksmakoto/ruby-working/ruby-wk/ruby-git/test/dl/test_cfunc.rb:9:in
    []' /export/home/ksmakoto/ruby-working/ruby-wk/ruby-git/test/dl/test_cfunc.rb:9:in setup’

2 tests, 0 assertions, 0 failures, 1 errors, 0 skips
*** Error code 1

Stop in /export/home/ksmakoto/ruby-working/ruby-wk/BUILD.

HEAD の他、trunk の open-uri のテストが作られた最初のリビジョンでも同様にエラーになります
また、test-all で全てのテストを実行した場合にも起きることがあり、test
ディレクトリ以下のディレクトリ中のファイルの並び順によって起きたり起きなかったりします。起きるパターンになっていると必ず起きます

Issue #5021 has been updated by Yui NARUSE.

ちなみに、これの再現コードは以下のとおりでした。

require ‘dl’
require ‘socket’
Socket.gethostbyname(“localhost”)
DL::dlopen(“/usr/lib/libc.so”)[‘strcpy’]

Bug #5021: test_empty(DL::TestCFunc): DL::DLError: unknown symbol
“strcpy”

Author: Makoto K.
Status: Closed
Priority: Low
Assignee:
Category:
Target version: 1.9.x
ruby -v: ruby 1.9.3dev (2011-07-10) [x86_64-freebsd8.2]

手元の環境(FreeBSD 8.2 STABLE)で、
make test-all TESTS=‘-n test_empty dl/test_cfunc.rb
open-uri/test_open-uri.rb’
のようにして test-all を実行すると、DL::TestCFunc の test_empty で以下のようにエラーが起きます

$ make test-all TESTS=‘-n test_empty dl/test_cfunc.rb
open-uri/test_open-uri.rb’
./miniruby -I…/ruby-git/lib -I. -I.ext/common
…/ruby-git/tool/runruby.rb --extout=.ext – --disable-gems
“…/ruby-git/test/runner.rb” --ruby=“./miniruby -I…/ruby-git/lib -I.
-I.ext/common …/ruby-git/tool/runruby.rb --extout=.ext –
–disable-gems” -n test_empty dl/test_cfunc.rb open-uri/test_open-uri.rb
Run options: “–ruby=./miniruby -I…/ruby-git/lib -I. -I.ext/common
…/ruby-git/tool/runruby.rb --extout=.ext – --disable-gems” -n
test_empty

Running tests:

.E

Finished tests in 0.002551s, 784.1563 tests/s, 0.0000 assertions/s.

  1. Error:
    test_empty(DL::TestCFunc):
    DL::DLError: unknown symbol “strcpy”
    /export/home/ksmakoto/ruby-working/ruby-wk/ruby-git/test/dl/test_cfunc.rb:9:in
    []' /export/home/ksmakoto/ruby-working/ruby-wk/ruby-git/test/dl/test_cfunc.rb:9:in setup’

2 tests, 0 assertions, 0 failures, 1 errors, 0 skips
*** Error code 1

Stop in /export/home/ksmakoto/ruby-working/ruby-wk/BUILD.

HEAD の他、trunk の open-uri のテストが作られた最初のリビジョンでも同様にエラーになります
また、test-all で全てのテストを実行した場合にも起きることがあり、test
ディレクトリ以下のディレクトリ中のファイルの並び順によって起きたり起きなかったりします。起きるパターンになっていると必ず起きます