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@xxxxxxxxxx> --- 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