aboutsummaryrefslogtreecommitdiff
path: root/tests/shm-fork.sh
blob: 174c543f183c7b5ce34b3b1b8fa42d3f8ee6768c (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-fork 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-fork "$@"