Bug #5222

test_script_from_stdin のエラー

Added by Naohisa Goto over 2 years ago. Updated over 2 years ago.

[ruby-dev:44420]
Status:Closed
Priority:Low
Assignee:Naohisa Goto
Category:test
Target version:1.9.4
ruby -v:ruby 1.9.4dev (2011-08-23) [sparc64-solaris2.10] Backport:

Description

一部の環境(Solarisなど)では、master PTY が端末ではないため、
IO#echo= に失敗して testscriptfrom_stdin がエラーになります。

45) Error:
testscriptfromstdin(TestRubyOptions):
Errno::EINVAL: Invalid argument
/X/src/sparc64-cc11-trunk-33024/test/ruby/
test
rubyoptions.rb:517:in echo='
/X/src/sparc64-cc11-trunk-33024/test/ruby/
test_rubyoptions.rb:517:in
block (2 levels) in testscriptfromstdin'
/X/src/sparc64-cc11-trunk-33024/test/ruby/
test
rubyoptions.rb:516:in open'
/X/src/sparc64-cc11-trunk-33024/test/ruby/
test_rubyoptions.rb:516:in
block in testscriptfromstdin'
/X/src/sparc64-cc11-trunk-33024/test/ruby/
test
rubyoptions.rb:514:in pipe'
/X/src/sparc64-cc11-trunk-33024/test/ruby/
test_rubyoptions.rb:514:in
testscriptfrom_stdin'

添付のパッチのように slave を操作すれば、エラーが出ずテストに成功します。

参考:

test-rubyoptions.patch Magnifier (719 Bytes) Naohisa Goto, 08/25/2011 12:58 AM

Associated revisions

Revision 33049
Added by Naohisa Goto over 2 years ago

  • test/ruby/testrubyoptions.rb (testscriptfromstdin): slave pty should be manipulated because master pty may not be a tty on some environment (e.g. Solaris). [Bug:#5222]

History

#1 Updated by Nobuyoshi Nakada over 2 years ago

  • Category set to test
  • Status changed from Open to Assigned
  • Assignee set to Naohisa Goto
  • Target version set to 1.9.4

添付がないようですがよろしく。

#2 Updated by Naohisa Goto over 2 years ago

すいません。添付ファイルが抜けてました。

#3 Updated by Naohisa Goto over 2 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r33049.
Naohisa, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • test/ruby/testrubyoptions.rb (testscriptfromstdin): slave pty should be manipulated because master pty may not be a tty on some environment (e.g. Solaris). [Bug:#5222]

Also available in: Atom PDF