kgio RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: 375gnu <375gnu@gmail.com>
To: kgio@librelist.org
Subject: kgio, autopush test fails on Debian GNU/kFreeBSD
Date: Sun, 4 Mar 2012 19:02:58 +0300	[thread overview]
Message-ID: <CAAB-Kcm+aVZu=MinoLfOWp23YTgArh7ns=vOv8Wkw4O_LsWozg@mail.gmail.com> (raw)
In-Reply-To: <CAAB-Kcm+aVZu=MinoLfOWp23YTgArh7ns=vOv8Wkw4O_LsWozg@mail.gmail.com>

I know that it's an exotic system, but anyway.

In the last assertion getsockopt returns 0. May be it's good behavior for
GNU/kFreeBSD, I don't know.

  def test_autopush_accessors
    Kgio.autopush = true
    opt = RUBY_PLATFORM =~ /freebsd/ ? TCP_NOPUSH : TCP_CORK
    s = Kgio::TCPSocket.new(@host, @port)
    assert_equal 0, s.getsockopt(Socket::IPPROTO_TCP, opt).unpack('i')[0]
    assert ! s.kgio_autopush?
    s.kgio_autopush = true
    assert s.kgio_autopush?
    assert_nothing_raised { s.kgio_write 'asdf' }
    assert_equal :wait_readable, s.kgio_tryread(1)
    assert s.kgio_autopush?
    assert_equal 1, s.getsockopt(Socket::IPPROTO_TCP, opt).unpack('i')[0]
  end



-- 
https://375gnu.wordpress.com/
https://launchpad.net/~375gnu/+archive/ppa


       reply	other threads:[~2012-03-04 16:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-04 16:02 375gnu [this message]
2012-03-05  8:43 ` kgio, autopush test fails on Debian GNU/kFreeBSD Eric Wong
2012-03-05 18:59   ` 375gnu
2012-03-05 23:45     ` Eric Wong
2012-03-05 23:47       ` [PATCH 1/3] accept4: require SOCK_NONBLOCK/SOCK_CLOEXEC macros Eric Wong
2012-03-05 23:47       ` [PATCH 2/3] autopush: fix/enable under Debian GNU/kFreeBSD Eric Wong
2012-03-05 23:47       ` [PATCH 3/3] test: increase delta range for timing-sensitive test 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/kgio/

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

  git send-email \
    --in-reply-to='CAAB-Kcm+aVZu=MinoLfOWp23YTgArh7ns=vOv8Wkw4O_LsWozg@mail.gmail.com' \
    --to=375gnu@gmail.com \
    --cc=kgio@librelist.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://yhbt.net/kgio.git/

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).