Bug #5222

test_script_from_stdin のエラー

Added by Naohisa Goto almost 4 years ago. Updated almost 4 years ago.

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

Description

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

45) Error:
test_script_from_stdin(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 test_script_from_stdin'
/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 test_script_from_stdin'
/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
test_script_from_stdin'

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

参考:

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

Associated revisions

Revision 33049
Added by Naohisa Goto almost 4 years ago

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

Revision 33049
Added by Naohisa Goto almost 4 years ago

  • test/ruby/test_rubyoptions.rb (test_script_from_stdin): 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 almost 4 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 almost 4 years ago

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

#3 Updated by Naohisa Goto almost 4 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/test_rubyoptions.rb (test_script_from_stdin): 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