Add test programs for lage page

Tests arm64 specific, contiguous bit based large pages as well.

Change-Id: I09edad8cfde6c23a259f1f32cfc97974d9cb63c3
This commit is contained in:
Masamichi Takagi
2018-12-07 19:28:51 +09:00
committed by Dominique Martinet
parent 100754f556
commit 9f7425c152
86 changed files with 5024 additions and 0 deletions

28
test/large_page/check.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/sh
test_id=$1
log_file="./log/${test_id}.log"
num_addrs=`grep -c1 "large page request" $log_file`
for i in `seq 0 $((num_addrs - 1))`
do
addr=`grep "large page request" $log_file | grep -e "trial#: $(printf "%03d" $i)" | tail -1 | grep -oE 'addr: \w{16}' | sed 's/addr: //'`
pgsize_requested=`grep "large page request" $log_file | grep -e "trial#: $(printf "%03d" $i)" | tail -1 | grep -oE 'size: \w*' | sed 's/size: //'`
pgsize_allocated=`grep "large page allocation" $log_file | grep -e $addr | tail -1 | grep -oE 'size: \w*' | sed 's/size: //'`
if [ "$pgsize_requested" != "$pgsize_allocated" ]; then
printf "\t[ NG ] "
else
printf "\t[ OK ] "
fi
printf "trial #: $(printf "%03d" $i), addr: $addr, requested size: $pgsize_requested, allocated size: $pgsize_allocated\n"
if [ "$pgsize_requested" != "$pgsize_allocated" ]; then
exit 1
fi
done
exit 0