From 7704f9e5c8ef865e189952a2dc92a17181a0cd76 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 6 Feb 2018 07:57:40 +0000 Subject: [PATCH] Fix tests to reflect new filesize. --- tests/acceptance/environment.rb | 2 ++ tests/acceptance/flexnbd/fake_dest.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/environment.rb b/tests/acceptance/environment.rb index f350525..cba6cbf 100644 --- a/tests/acceptance/environment.rb +++ b/tests/acceptance/environment.rb @@ -7,6 +7,8 @@ class Environment def initialize # 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 @filename1 = "/tmp/.flexnbd.test.#{$PROCESS_ID}.#{Time.now.to_i}.1" @filename2 = "/tmp/.flexnbd.test.#{$PROCESS_ID}.#{Time.now.to_i}.2" diff --git a/tests/acceptance/flexnbd/fake_dest.rb b/tests/acceptance/flexnbd/fake_dest.rb index 26d82bf..0b0e414 100644 --- a/tests/acceptance/flexnbd/fake_dest.rb +++ b/tests/acceptance/flexnbd/fake_dest.rb @@ -22,7 +22,7 @@ module FlexNBD if opts[:size] == :wrong write_rand(@sock, 8) else - @sock.write("\x00\x00\x00\x00\x00\x00\x10\x00") + @sock.write("\x00\x00\x00\x00\x00\x01\x00\x00") end @sock.write("\x00" * 128)