summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/cryptodev/sdk_patches/0072-use-.-instead-of-.-for-consistency.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/cryptodev/sdk_patches/0072-use-.-instead-of-.-for-consistency.patch')
-rw-r--r--recipes-kernel/cryptodev/sdk_patches/0072-use-.-instead-of-.-for-consistency.patch82
1 files changed, 82 insertions, 0 deletions
diff --git a/recipes-kernel/cryptodev/sdk_patches/0072-use-.-instead-of-.-for-consistency.patch b/recipes-kernel/cryptodev/sdk_patches/0072-use-.-instead-of-.-for-consistency.patch
new file mode 100644
index 000000000..0cf2a0c29
--- /dev/null
+++ b/recipes-kernel/cryptodev/sdk_patches/0072-use-.-instead-of-.-for-consistency.patch
@@ -0,0 +1,82 @@
1From abcf5983f6d69c5ff35e77fb79ea7afe2149411a Mon Sep 17 00:00:00 2001
2From: Cristian Stoica <cristian.stoica@nxp.com>
3Date: Thu, 27 Oct 2016 09:33:11 +0300
4Subject: [PATCH 072/104] use $(...) instead of `...` for consistency
5
6Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
7---
8 tests/async_speed_multi.sh | 24 ++++++++++++------------
9 1 file changed, 12 insertions(+), 12 deletions(-)
10
11diff --git a/tests/async_speed_multi.sh b/tests/async_speed_multi.sh
12index 659be0e..e10dc0d 100755
13--- a/tests/async_speed_multi.sh
14+++ b/tests/async_speed_multi.sh
15@@ -19,7 +19,7 @@
16
17 # no user-configurable options below this line
18
19-NUM_CORES=`nproc`
20+NUM_CORES=$(nproc)
21 OUT_BASENAME="async_speed"
22 S_TIME_FORMAT=ISO
23 MPSTAT_OUT="mpstat_out"
24@@ -44,9 +44,9 @@ function SUM {
25
26 function get_cpu_idle
27 {
28- header_line=`grep %idle ${MPSTAT_OUT} | head -n 1 | sed 's/\s\+/ /g'`
29- idle_column=`echo $header_line | wc -w`
30- average_idle=`grep Average ${MPSTAT_OUT} | sed 's/\s\+/ /g' | cut -d' ' -f ${idle_column} | tail -n 1`
31+ header_line=$(grep %idle ${MPSTAT_OUT} | head -n 1 | sed 's/\s\+/ /g')
32+ idle_column=$(echo $header_line | wc -w)
33+ average_idle=$(grep Average ${MPSTAT_OUT} | sed 's/\s\+/ /g' | cut -d' ' -f ${idle_column} | tail -n 1)
34
35 echo $average_idle
36 }
37@@ -66,9 +66,9 @@ function run_parallel
38 MPSTAT_PID=$!
39
40 PIDS=""
41- start=`date +%s.%N`
42+ start=$(date +%s.%N)
43
44- for i in `seq 0 $(($mvalue-1))`
45+ for i in $(seq 0 $(($mvalue-1)))
46 do
47 CMD_OUT="${OUT_BASENAME}_${i}"
48
49@@ -81,14 +81,14 @@ function run_parallel
50 done
51
52 wait $PIDS
53- end=`date +%s.%N`
54+ end=$(date +%s.%N)
55
56 wait $MPSTAT_PID
57
58 runtime=$(echo "scale=2; ($end - $start) / 1" | bc -l )
59- total_data=`cat ${OUT_BASENAME}_* | cut -f 1 | SUM`
60+ total_data=$(cat ${OUT_BASENAME}_* | cut -f 1 | SUM)
61 avg_speed=$(echo "scale=2; $total_data / $runtime / 1000000000" | bc -l)
62- cpu_idle=`get_cpu_idle`
63+ cpu_idle=$(get_cpu_idle)
64
65 echo
66 echo "buffer size : $nvalue"
67@@ -124,9 +124,9 @@ function main
68 shift $((OPTIND-1))
69 alg_name=$1
70
71- [ -z "$tvalue" ] && tvalue=10 # 10 seconds per test by default
72- [ -z "$mvalue" ] && mvalue=`nproc` # thread count defaults to nproc
73- [ -z "$nvalue" ] && nvalue=256 # 256 bytes default buffer size
74+ [ -z "$tvalue" ] && tvalue=10 # 10 seconds per test by default
75+ [ -z "$mvalue" ] && mvalue=$NUM_CORES # thread count defaults to nproc
76+ [ -z "$nvalue" ] && nvalue=256 # 256 bytes default buffer size
77
78 [ "$tvalue" -lt 5 ] && tvalue=5
79
80--
812.10.2
82