Project

General

Profile

Bug #11728

TestSocket#test_timestamp failure on Solaris 10 with -D_XOPEN_SOURCE=500

Added by ngoto (Naohisa Goto) over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0dev (2015-11-20) [sparc64-solaris2.10]
[ruby-dev:49377]

Description

Solaris 10 にて、CFLAGSに -D_XOPEN_SOURCE=500 を追加して、SUSv2準拠にてコンパイルした場合、make test-all にて以下のエラーが発生します。

Finished tests in 1518.357144s, 10.4659 tests/s, 1475.1002 assertions/s.

  1) Error:
TestSocket#test_timestamp:
SocketError: unknown socket level option name: TIMESTAMP
    /XXXXX-52685/test/socket/test_socket.rb:461:in `setsockopt'
    /XXXXX-52685/test/socket/test_socket.rb:461:in `block (2 levels) in test_timestamp'
    /XXXXX-52685/.ext/common/socket.rb:190:in `bind'
    /XXXXX-52685/test/socket/test_socket.rb:460:in `block in test_timestamp'
    /XXXXX-52685/.ext/common/socket.rb:190:in `bind'
    /XXXXX-52685/test/socket/test_socket.rb:459:in `test_timestamp'

15891 tests, 2239729 assertions, 0 failures, 1 errors, 49 skips

ruby -v: ruby 2.3.0dev (2015-11-20) [sparc64-solaris2.10]
make: *** [yes-test-all] Error 1

-D_XOPEN_SOURCE=500 つまり #define _XOPEN_SOURCE 500 にすると、
Solaris でも Socket::AncillaryData が使えるようになるのですが、
SO_TIMESTAMP は Solaris 10 には存在しないため、エラーになったようです。
(SO_TIMESTAMP は Solaris 11 から追加されたようです。)

(参考: _XOPEN_SOURCE の値と準拠する標準に関しては https://docs.oracle.com/cd/E36784_01/html/E36883/xpg4-5.html などを参照。
なお、Rubyでは __EXTENSIONS__ がconfigureにて自動的に付加され、使用する標準と衝突しない新旧の追加機能は使える設定になっています。)

Associated revisions

Revision 0917a3de
Added by ngoto (Naohisa Goto) over 3 years ago

  • test/socket/test_socket.rb (test/socket/test_socket.rb): skip the test when Socket::SO_TIMESTAMP is not defined. Fix error on Solaris 10. [Bug #11728] [ruby-dev:49377]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 52701
Added by ngoto (Naohisa Goto) over 3 years ago

  • test/socket/test_socket.rb (test/socket/test_socket.rb): skip the test when Socket::SO_TIMESTAMP is not defined. Fix error on Solaris 10. [Bug #11728] [ruby-dev:49377]

Revision 52701
Added by ngoto (Naohisa Goto) over 3 years ago

  • test/socket/test_socket.rb (test/socket/test_socket.rb): skip the test when Socket::SO_TIMESTAMP is not defined. Fix error on Solaris 10. [Bug #11728] [ruby-dev:49377]

Revision 52701
Added by ngoto (Naohisa Goto) over 3 years ago

  • test/socket/test_socket.rb (test/socket/test_socket.rb): skip the test when Socket::SO_TIMESTAMP is not defined. Fix error on Solaris 10. [Bug #11728] [ruby-dev:49377]

Revision 52701
Added by ngoto (Naohisa Goto) over 3 years ago

  • test/socket/test_socket.rb (test/socket/test_socket.rb): skip the test when Socket::SO_TIMESTAMP is not defined. Fix error on Solaris 10. [Bug #11728] [ruby-dev:49377]

Revision 52701
Added by ngoto (Naohisa Goto) over 3 years ago

  • test/socket/test_socket.rb (test/socket/test_socket.rb): skip the test when Socket::SO_TIMESTAMP is not defined. Fix error on Solaris 10. [Bug #11728] [ruby-dev:49377]

History

#1

Updated by ngoto (Naohisa Goto) over 3 years ago

  • Status changed from Open to Closed

Applied in changeset r52701.


  • test/socket/test_socket.rb (test/socket/test_socket.rb): skip the test when Socket::SO_TIMESTAMP is not defined. Fix error on Solaris 10. [Bug #11728] [ruby-dev:49377]

Also available in: Atom PDF