And here is the debdiff. cu Adrian
On Thu, Aug 25, 2022 at 09:27:20PM +0300, Adrian Bunk wrote: > Package: release.debian.org > Severity: normal > Tags: buster > User: [email protected] > Usertags: pu > X-Debbugs-Cc: Debian Ruby Extras Maintainers > <[email protected]>; > > * Skip more EAGAIN related tests. (Closes: #988023) > > debian/patches/disable-no-eagain-test.patch was updated to the > version in 0.6.3-2, fixing the FTBFS.
diff -Nru ruby-hiredis-0.6.1/debian/changelog ruby-hiredis-0.6.1/debian/changelog --- ruby-hiredis-0.6.1/debian/changelog 2018-10-12 10:38:52.000000000 +0300 +++ ruby-hiredis-0.6.1/debian/changelog 2022-08-25 21:21:59.000000000 +0300 @@ -1,3 +1,10 @@ +ruby-hiredis (0.6.1-2+deb10u1) buster; urgency=medium + + * Non-maintainer upload. + * Skip more EAGAIN related tests. (Closes: #988023) + + -- Adrian Bunk <[email protected]> Thu, 25 Aug 2022 21:21:59 +0300 + ruby-hiredis (0.6.1-2) unstable; urgency=medium [ Cédric Boutillier ] diff -Nru ruby-hiredis-0.6.1/debian/patches/disable-no-eagain-test.patch ruby-hiredis-0.6.1/debian/patches/disable-no-eagain-test.patch --- ruby-hiredis-0.6.1/debian/patches/disable-no-eagain-test.patch 2016-02-09 16:07:46.000000000 +0200 +++ ruby-hiredis-0.6.1/debian/patches/disable-no-eagain-test.patch 2022-08-25 21:21:52.000000000 +0300 @@ -1,28 +1,107 @@ -Author: Apollon Oikonomopoulos <[email protected]> -Description: Disable test_no_eagain_after_cumulative_wait_exceeds_timeout - This test is probably too time-sensitive and yields different results across - different kernels (seems to work reliably only on Linux). +From: Apollon Oikonomopoulos <[email protected]> +Date: Mon, 20 Jan 2020 09:28:45 -0300 +Subject: Disable EAGAIN related tests +These tests are probably too time-sensitive and yields different results across +different kernels (seems to work reliably only on Linux). Forwarded: no -Last-Update: 2014-04-14 +Last-Update: 2020-02-19 + +test +--- + test/connection_test.rb | 105 ------------------------------------------------ + 1 file changed, 105 deletions(-) + +diff --git a/test/connection_test.rb b/test/connection_test.rb +index 513d520..bd94e80 100644 --- a/test/connection_test.rb +++ b/test/connection_test.rb -@@ -361,35 +361,37 @@ +@@ -281,111 +281,6 @@ module ConnectionTests end end +- def test_recover_from_partial_write +- listen do |server| +- hiredis.connect("localhost", 6380) +- +- # Find out send buffer size +- sndbuf = sockopt(hiredis.sock, Socket::SO_SNDBUF) +- +- # Make request that saturates the send buffer +- hiredis.write(["x" * sndbuf]) +- +- # Flush and disconnect to signal EOF +- hiredis.flush +- hiredis.disconnect +- +- # Compare to data received on the other end +- formatted = "*1\r\n$#{sndbuf}\r\n#{"x" * sndbuf}\r\n" +- assert formatted == server.read +- end +- end +- +- # +- # This does not have consistent outcome for different operating systems... +- # +- # def test_eagain_on_write +- # listen do |server| +- # hiredis.connect("localhost", 6380) +- # hiredis.timeout = 100_000 +- +- # # Find out buffer sizes +- # sndbuf = sockopt(hiredis.sock, Socket::SO_SNDBUF) +- # rcvbuf = sockopt(hiredis.sock, Socket::SO_RCVBUF) +- +- # # Make request that fills both the remote receive buffer and the local +- # # send buffer. This assumes that the size of the receive buffer on the +- # # remote end is equal to our local receive buffer size. +- # assert_raises Errno::EAGAIN do +- # hiredis.write(["x" * rcvbuf * 2]) +- # hiredis.write(["x" * sndbuf * 2]) +- # hiredis.flush +- # end +- # end +- # end +- +- def test_eagain_on_write_followed_by_remote_drain +- listen do |server| +- hiredis.connect("localhost", 6380) +- hiredis.timeout = 100_000 +- +- # Find out buffer sizes +- sndbuf = sockopt(hiredis.sock, Socket::SO_SNDBUF) +- rcvbuf = sockopt(hiredis.sock, Socket::SO_RCVBUF) +- +- # This thread starts reading the server buffer after 50ms. This will +- # cause the local write to first return EAGAIN, wait for the socket to +- # become writable with select(2) and retry. +- begin +- thread = Thread.new do +- sleep(0.050) +- loop do +- server.read(1024) +- end +- end +- +- # Make request that fills both the remote receive buffer and the local +- # send buffer. This assumes that the size of the receive buffer on the +- # remote end is equal to our local receive buffer size. +- hiredis.write(["x" * rcvbuf]) +- hiredis.write(["x" * sndbuf]) +- hiredis.flush +- hiredis.disconnect +- ensure +- thread.kill +- end +- end +- end +- - def test_no_eagain_after_cumulative_wait_exceeds_timeout - listen do |server| - hiredis.connect("localhost", 6380) - hiredis.timeout = 10_000 -+ # The following test seems to be too sensitive wrt to timing and gives -+ # unstable results across operating systems. -+ #def test_no_eagain_after_cumulative_wait_exceeds_timeout -+ # listen do |server| -+ # hiredis.connect("localhost", 6380) -+ # hiredis.timeout = 10_000 - +- - begin - thread = Thread.new do - loop do @@ -30,14 +109,7 @@ - server.write("+ok\r\n") - end - end -+ # begin -+ # thread = Thread.new do -+ # loop do -+ # sleep(0.001) -+ # server.write("+ok\r\n") -+ # end -+ # end - +- - # The read timeout for this connection is 10 milliseconds. - # To compensate for the overhead of parsing the reply and the chance - # not having to wait because the reply is already present in the OS @@ -54,22 +126,6 @@ - end - end - end -+ # # The read timeout for this connection is 10 milliseconds. -+ # # To compensate for the overhead of parsing the reply and the chance -+ # # not having to wait because the reply is already present in the OS -+ # # buffers, continue until we have waited at least 5x the timeout. -+ # waited = 0 -+ # while waited < 50_000 -+ # t1 = Time.now -+ # hiredis.read -+ # t2 = Time.now -+ # waited += (t2 - t1) * 1_000_000 -+ # end -+ # ensure -+ # thread.kill -+ # end -+ # end -+ #end end if defined?(Hiredis::Ruby::Connection)

