refactor mmap test