This commit is contained in:
Patrick J Cherry
2018-02-02 21:34:14 +00:00
parent 1b7b688f7a
commit 9c48da82cc
40 changed files with 666 additions and 858 deletions

View File

@@ -1,6 +1,4 @@
#!/usr/bin/env ruby
# encoding: utf-8
# We connect, pause the server, issue a write request, send data,
# disconnect, then cont the server. This ensures that our disconnect
# happens before the server can try to write the reply.
@@ -10,13 +8,13 @@ include FlexNBD
addr, port, srv_pid = *ARGV
client = FakeSource.new( addr, port, "Timed out connecting" )
client = FakeSource.new(addr, port, 'Timed out connecting')
client.read_hello
system "kill -STOP #{srv_pid}"
client.write_write_request( 0, 8 )
client.write_data( "12345678" )
client.write_write_request(0, 8)
client.write_data('12345678')
client.close
system "kill -CONT #{srv_pid}"
@@ -27,7 +25,7 @@ system "kill -CONT #{srv_pid}"
sleep(0.25)
# ...and can we reconnect?
client2 = FakeSource.new( addr, port, "Timed out reconnecting" )
client2 = FakeSource.new(addr, port, 'Timed out reconnecting')
client2.close
exit(0)