#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2015-2019, Intel Corporation

#
# src/test/util_map_proc/TEST5 -- unit test for util_map /proc parsing
#

. ../unittest/unittest.sh

require_test_type medium

require_fs_type none
require_procfs
configure_valgrind memcheck force-disable

setup

export TEST_LOG_LEVEL=10
export TEST_LOG_FILE=./test$UNITTEST_NUM.log

export PMEM_MMAP_HINT=0

# there should be an unused region for each length
mapfile="maps_all_"$(uname -s | tr "[:upper:]" "[:lower:]")
expect_normal_exit ./util_map_proc$EXESUFFIX $mapfile\
     0x0000100000\
     0x0001000000\
     0x0040000000\
     0x0400000000\
     0x4000000000

check

pass
