kgio RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <>
Subject: [PATCH 2/3] test/lib_read_write: wait for readability before tryread
Date: Wed, 11 Jul 2012 15:34:57 -0700	[thread overview]
Message-ID: <> (raw)

From: Eric Wong <ew@debkfreebsd.(none)>

On FreeBSD, writing to a loopback TCP socket does not guarantee
immediate readability on the other end.

Tested on Debian GNU/kFreeBSD 6.0
 test/lib_read_write.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/test/lib_read_write.rb b/test/lib_read_write.rb
index 04d6fc6..586e826 100644
--- a/test/lib_read_write.rb
+++ b/test/lib_read_write.rb
@@ -242,6 +242,7 @@ module LibReadWriteTest
   def test_tryread_too_much
     assert_equal nil, @wr.kgio_trywrite("hi")
+    assert_equal @rd, @rd.kgio_wait_readable
     assert_equal "hi", @rd.kgio_tryread(4)

  parent reply	other threads:[~2012-07-11 22:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 22:34 [PATCH 0/3] test fixes for GNU/kFreeBSD (and possibly other *BSDs) Eric Wong
2012-07-11 22:34 ` [PATCH 1/3] test_poll: skip signal torture on Debian GNU/kfreebsd Eric Wong
2012-07-11 22:34 ` Eric Wong [this message]
2012-07-11 22:34 ` [PATCH 3/3] test workaround for platforms with unreliable signals Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).