fix: fork's race-condition caused by child and grand-child

Refs: #1329
Change-Id: Ia2d7641d1203f40155fef5db718d1bb2c583c1c5
This commit is contained in:
Ken Sato
2019-12-20 11:24:14 +09:00
committed by Masamichi Takagi
parent 5b26fe2956
commit 911b07f507
16 changed files with 2236 additions and 361 deletions

43
test/issues/1329/C1329.sh Executable file
View File

@ -0,0 +1,43 @@
#/bin/sh
USELTP=1
USEOSTEST=0
. ../../common.sh
issue="1329"
tid=01
if [ `uname -p` == "x86_64" ]; then
tname=`printf "C${issue}T%02d" ${tid}`
echo "*** ${tname} start *******************************"
for idx in `seq 1 300`;
do
echo "*** Rep: $idx ***"
echo -n "** Start:"
date "+%H:%M:%S"
sudo $MCEXEC $LTPBIN/msgctl11
echo -n "** Done:"
date "+%H:%M:%S"
done
echo "*** ${tname} PASSED"
fi
let tid++
for tp in fork01 fork02 fork03 fork04 fork05 fork06 fork07 fork08 fork09 fork10 fork11
do
tname=`printf "C${issue}T%02d" ${tid}`
echo "*** ${tname} start *******************************"
sudo $MCEXEC $LTPBIN/$tp 2>&1 | tee $tp.txt
ok=`grep PASS $tp.txt | wc -l`
ng=`grep FAIL $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