87 lines
3.3 KiB
Diff
87 lines
3.3 KiB
Diff
From 6a9f1f6d5a19beed45dd81f74a41c18dcd3bd3dc Mon Sep 17 00:00:00 2001
|
|
From: John Kacur <jkacur@redhat.com>
|
|
Date: Mon, 11 Nov 2019 22:20:23 +0100
|
|
Subject: [PATCH] rt-tests: queuelat: Fix some warnings in
|
|
determine_maximum_mpps.sh
|
|
|
|
Coverity advises to quote some values to prevent word splitting and to
|
|
export variables separately after declaraing them to avoid masking
|
|
errors.
|
|
|
|
Fix these warnings
|
|
|
|
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
---
|
|
src/queuelat/determine_maximum_mpps.sh | 15 ++++++++-------
|
|
1 file changed, 8 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/src/queuelat/determine_maximum_mpps.sh b/src/queuelat/determine_maximum_mpps.sh
|
|
index cd45454720f7..3acd6ba2e362 100755
|
|
--- a/src/queuelat/determine_maximum_mpps.sh
|
|
+++ b/src/queuelat/determine_maximum_mpps.sh
|
|
@@ -18,7 +18,7 @@ for mpps in `seq 3 3 50`; do
|
|
echo testing $mpps Mpps
|
|
|
|
OUTFILE=`mktemp`
|
|
- $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
|
|
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p "$mpps" -t 30 > $OUTFILE
|
|
|
|
exceeded=`grep exceeded $OUTFILE`
|
|
if [ ! -z "$exceeded" ]; then
|
|
@@ -34,7 +34,7 @@ for mpps in `seq $first_mpps -1 3`; do
|
|
echo testing $mpps Mpps
|
|
|
|
OUTFILE=`mktemp`
|
|
- $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
|
|
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p "$mpps" -t 30 > $OUTFILE
|
|
|
|
exceeded=`grep exceeded $OUTFILE`
|
|
if [ -z "$exceeded" ]; then
|
|
@@ -51,7 +51,7 @@ for mpps in `seq $second_mpps 0.3 $first_mpps`; do
|
|
echo testing $mpps Mpps
|
|
|
|
OUTFILE=`mktemp`
|
|
- $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
|
|
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p "$mpps" -t 30 > $OUTFILE
|
|
|
|
exceeded=`grep exceeded $OUTFILE`
|
|
if [ ! -z "$exceeded" ]; then
|
|
@@ -68,7 +68,7 @@ for mpps in `seq $third_mpps -0.1 3`; do
|
|
echo testing $mpps Mpps
|
|
|
|
OUTFILE=`mktemp`
|
|
- $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
|
|
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `sh get_cpuinfo_mhz.sh` -p "$mpps" -t 30 > $OUTFILE
|
|
|
|
exceeded=`grep exceeded $OUTFILE`
|
|
if [ -z "$exceeded" ]; then
|
|
@@ -87,13 +87,14 @@ while [ $queuelat_failure == 1 ]; do
|
|
echo "$mpps Mpps"
|
|
|
|
for i in `seq 1 10`; do
|
|
- $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `get_cpuinfo_mhz.sh` -p $mpps -t 30 > $OUTFILE
|
|
+ $PREAMBLE ./queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `get_cpuinfo_mhz.sh` -p "$mpps" -t 30 > $OUTFILE
|
|
exceeded=`grep exceeded $OUTFILE`
|
|
|
|
if [ ! -z "$exceeded" ]; then
|
|
echo "mpps failure (run $i) $mpps"
|
|
export queuelat_failure=1
|
|
- export mpps=`echo $mpps - 0.1 | bc`
|
|
+ mpps=`echo $mpps - 0.1 | bc`
|
|
+ export mpps
|
|
break
|
|
fi
|
|
echo "run $i success"
|
|
@@ -109,7 +110,7 @@ while [ $queuelat_failure == 1 ]; do
|
|
echo -n "Starting 10 minutes run with "
|
|
echo "$mpps Mpps"
|
|
|
|
- $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `get_cpuinfo_mhz.sh` -p $mpps -t 600 > $OUTFILE
|
|
+ $PREAMBLE queuelat -m $MAXLAT -c $CYCLES_PER_PACKET -f `get_cpuinfo_mhz.sh` -p "$mpps" -t 600 > $OUTFILE
|
|
exceeded=`grep exceeded $OUTFILE`
|
|
|
|
if [ ! -z "$exceeded" ]; then
|
|
--
|
|
2.20.1
|
|
|