aboutsummaryrefslogtreecommitdiff
path: root/tests/shm-getraw.sh
blob: fb4f917678a628007af8ea23484e42e26e70b098 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

. wrapper-utils.sh

#shm-getraw will fail if the hugepage size is different from the system default

def_hpage_size=`grep 'Hugepagesize:' /proc/meminfo | awk '{print $2}'`
let "def_hpage_size *= 1024"

if [ -z "$HUGETLB_DEFAULT_PAGE_SIZE" ]; then
	EXP_RC=$RC_PASS
elif [ "$def_hpage_size" -eq "$HUGETLB_DEFAULT_PAGE_SIZE" ]; then
	EXP_RC=$RC_PASS
else
	EXP_RC=$RC_FAIL
fi

exec_and_check $EXP_RC shm-getraw "$@"