Use sysconf to determine actual page size for msync

Also added comments in tests around testing for msync offsets/lengths.
This commit is contained in:
Patrick J Cherry
2018-02-06 07:32:58 +00:00
parent 6d6948af09
commit 3a86870c9f
3 changed files with 15 additions and 6 deletions

View File

@@ -6,7 +6,8 @@ class Environment
:port1, :port2, :nbd1, :nbd2, :file1, :file2)
def initialize
@blocksize = 1024
# Make sure we have a few pages of memory so we can test msync offsets
@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"
@ip = '127.0.0.1'