mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 16:50:05 +00:00
rcutorture: Make kvm-recheck-rcu.sh handle truncated lines
System hangs or killed rcutorture guest OSes can result in truncated "Reader Pipe:" lines, which can in turn result in false-positive reader-batch near-miss warnings. This commit therefore adjusts the reader-batch checks to account for possible line truncation. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
parent
3b2a473985
commit
b3578186b2
@ -41,7 +41,21 @@ else
|
||||
title="$title ($ngpsps/s)"
|
||||
fi
|
||||
echo $title $stopstate $fwdprog
|
||||
nclosecalls=`grep --binary-files=text 'torture: Reader Batch' $i/console.log | tail -1 | awk '{for (i=NF-8;i<=NF;i++) sum+=$i; } END {print sum}'`
|
||||
nclosecalls=`grep --binary-files=text 'torture: Reader Batch' $i/console.log | tail -1 | \
|
||||
awk -v sum=0 '
|
||||
{
|
||||
for (i = 0; i <= NF; i++) {
|
||||
sum += $i;
|
||||
if ($i ~ /Batch:/) {
|
||||
sum = 0;
|
||||
i = i + 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
END {
|
||||
print sum
|
||||
}'`
|
||||
if test -z "$nclosecalls"
|
||||
then
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user