Project

General

Profile

Actions

Bug #356

closed

test_flush(TestIONonblock): Errno::EBADF: Bad file descriptor

Added by znz (Kazuhiro NISHIYAMA) over 15 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
Backport:
[ruby-dev:35638]

Description

=begin
Ubuntu 8.04.1の環境でtest_flush(TestIONonblock)がErrno::EBADFになります。
Debianなどの他の環境では(試した範囲内では)再現しませんでした。

% ruby-trunk -v test/io/nonblock/test_flush.rb
ruby 1.9.0 (2008-07-23 revision 18181) [i686-linux]
Loaded suite test/io/nonblock/test_flush
Started
E
Finished in 0.001041173 seconds.

  1. Error:
    test_flush(TestIONonblock):
    Errno::EBADF: Bad file descriptor
    test/io/nonblock/test_flush.rb:27:in flush' test/io/nonblock/test_flush.rb:27:in block in test_flush'
    /home/kazu/opt/ruby-trunk/lib/ruby/1.9.0/timeout.rb:52:in timeout' /home/kazu/opt/ruby-trunk/lib/ruby/1.9.0/timeout.rb:82:in timeout'
    test/io/nonblock/test_flush.rb:17:in `test_flush'

1 tests, 0 assertions, 0 failures, 1 errors
% lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04.1
Release: 8.04
Codename: hardy
%
=end

Actions #1

Updated by znz (Kazuhiro NISHIYAMA) over 15 years ago

=begin
まれにIOError: closed streamになることもあるようです。
それから何度も実行していて1度だけですがerrorにならなかったことがありました。

このテストの意図がよくわからないのですが、race conditionによってIOErrorが起きる可能性を考慮しているのならrescueした方が良いのではないでしょうか?
=end

Actions #2

Updated by znz (Kazuhiro NISHIYAMA) over 15 years ago

  • Assignee set to znz (Kazuhiro NISHIYAMA)

=begin

=end

Actions #3

Updated by Anonymous over 15 years ago

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

=begin
Applied in changeset r18372.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0