Merge branch 'postk_topic-contiguous_pte' into development
* Merge cd7ab307fae9bc8aa49d23b32becf37368a1603e * Merge commit is changed to one commit for gerrit Change-Id: I75f0f4cf6b8b3286284638ac2c7816c5257551e4
This commit is contained in:
48
test/contiguous_pte/go_contiguous_pte_test.sh
Normal file
48
test/contiguous_pte/go_contiguous_pte_test.sh
Normal file
@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
# go_contiguous_pte_test.sh COPYRIGHT FUJITSU LIMITED 2018
|
||||
contiguous_pte_test_dir=$(dirname "${BASH_SOURCE[0]}")
|
||||
|
||||
# read config
|
||||
. ${contiguous_pte_test_dir}/../common.sh
|
||||
. ${HOME}/.mck_test_config
|
||||
|
||||
os_num=0
|
||||
if [ ! -e "/dev/mcos${os_num}" ]; then
|
||||
echo "Error: failed to mcreboot"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
logdir="${contiguous_pte_test_dir}/result"
|
||||
mkdir -p "$logdir"
|
||||
|
||||
# exec test program
|
||||
user_proc="${contiguous_pte_test_dir}/bin/test_contiguous_pte"
|
||||
|
||||
for test_case in `grep -E '^TEST_CASE_DEF' ${contiguous_pte_test_dir}/src/test_case.list`
|
||||
do
|
||||
tp_num=`echo $test_case | sed 's|TEST_CASE_DEF(contiguous_pte,||g' | sed 's|)$||g'`
|
||||
logfile="${logdir}/${tp_num}.log"
|
||||
|
||||
# run
|
||||
echo "${MCEXEC} ${os_num} ${user_proc} -n $tp_num" >${logfile} 2>&1
|
||||
timeout 20 ${MCEXEC} ${os_num} ${user_proc} -n $tp_num >>${logfile}
|
||||
rcode=$?
|
||||
|
||||
# check result
|
||||
grep -q "^RESULT: ok$" ${logfile}
|
||||
if [ $? -eq 0 -a $rcode -eq 0 ]; then
|
||||
echo "OK: ${tp_num}"
|
||||
else
|
||||
echo "NG: ${tp_num}"
|
||||
echo "==" >>${logfile}
|
||||
echo "${IHKOSCTL} ${os_num} kmsg" >>${logfile}
|
||||
sudo ${IHKOSCTL} ${os_num} kmsg >>${logfile}
|
||||
fi
|
||||
|
||||
# restart after madvise system call test
|
||||
if [ 400 -le $tp_num -a $tp_num -lt 500 ]; then
|
||||
mcstop
|
||||
mcreboot
|
||||
fi
|
||||
done
|
||||
mcstop
|
||||
Reference in New Issue
Block a user