Fix tests to reflect new filesize.

This commit is contained in:
Patrick J Cherry
2018-02-06 07:57:40 +00:00
parent 3a86870c9f
commit 7704f9e5c8
2 changed files with 3 additions and 1 deletions

View File

@@ -7,6 +7,8 @@ class Environment
def initialize def initialize
# Make sure we have a few pages of memory so we can test msync offsets # Make sure we have a few pages of memory so we can test msync offsets
# NB If you change this, you need to match it in the flexnbd/fake_dest
# Flexnbd::FakeDest::Client#write_hello
@blocksize = Integer(`getconf PAGE_SIZE`) * 4 @blocksize = Integer(`getconf PAGE_SIZE`) * 4
@filename1 = "/tmp/.flexnbd.test.#{$PROCESS_ID}.#{Time.now.to_i}.1" @filename1 = "/tmp/.flexnbd.test.#{$PROCESS_ID}.#{Time.now.to_i}.1"
@filename2 = "/tmp/.flexnbd.test.#{$PROCESS_ID}.#{Time.now.to_i}.2" @filename2 = "/tmp/.flexnbd.test.#{$PROCESS_ID}.#{Time.now.to_i}.2"

View File

@@ -22,7 +22,7 @@ module FlexNBD
if opts[:size] == :wrong if opts[:size] == :wrong
write_rand(@sock, 8) write_rand(@sock, 8)
else else
@sock.write("\x00\x00\x00\x00\x00\x00\x10\x00") @sock.write("\x00\x00\x00\x00\x00\x01\x00\x00")
end end
@sock.write("\x00" * 128) @sock.write("\x00" * 128)