fix: madvise changes only the first one of vm_ranges

Change-Id: I83248c1162e28c3c24ca5f6b0933e1a8ca434d6b
Fujitsu: POSTK_DEBUG_TEMP_FIX_37
Refs: #1351
This commit is contained in:
Ken Sato
2019-08-23 15:35:31 +09:00
parent 0615a0b00b
commit 5d6715078f
8 changed files with 296 additions and 9 deletions

44
test/issues/1351/C1351.sh Executable file
View File

@@ -0,0 +1,44 @@
#/bin/sh
USELTP=1
USEOSTEST=0
. ../../common.sh
issue=1351
tid=01
tname=`printf "C${issue}T%02d" ${tid}`
echo "*** ${tname} start *******************************"
ng=0
${IHKOSCTL} 0 clear_kmsg
${MCEXEC} ./C1351
${IHKOSCTL} 0 kmsg | tee ./${tname}.txt
line=`grep -e "attr: 0x20731000" ./${tname}.txt | wc -l`
if [ ${line} -eq 3 ]; then
echo "*** ${tname} PASSED ******************************"
else
echo "*** ${tname} FAILED ******************************"
fi
let tid++
echo ""
for tp in madvise01 madvise02 madvise03 madvise04
do
tname=`printf "C${issue}T%02d" ${tid}`
echo "*** ${tname} start *******************************"
$MCEXEC $LTPBIN/$tp 2>&1 | tee $tp.txt
ok=`grep TPASS $tp.txt | wc -l`
ng=`grep TFAIL $tp.txt | wc -l`
if [ $ng = 0 ]; then
echo "*** ${tname} PASSED ($ok)"
else
echo "*** ${tname} FAILED (ok=$ok ng=%ng)"
fi
let tid++
echo ""
done