aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/cryptodev/sdk_patches/0080-graceful-exit-if-cryptodev-is-not-built-with-ASYNC-f.patch
blob: 64450df96f8ae9da8f7b0c32bbee655a997f170d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 9a486f5ebf648971db9bdbd30f7e52251a659ddd Mon Sep 17 00:00:00 2001
From: Cristian Stoica <cristian.stoica@nxp.com>
Date: Fri, 28 Oct 2016 12:01:00 +0300
Subject: [PATCH 080/104] graceful exit if cryptodev is not built with ASYNC
 flags

---
 tests/async_speed_multi.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/async_speed_multi.sh b/tests/async_speed_multi.sh
index 125d45c..f2a8ba6 100755
--- a/tests/async_speed_multi.sh
+++ b/tests/async_speed_multi.sh
@@ -82,6 +82,13 @@ function run_parallel
 
     wait $MPSTAT_PID
 
+    grep "ioctl" ${OUT_BASENAME}_* &> /dev/null
+    if (($? == 0))
+    then
+	echo "cryptodev is not built with -DENABLE_ASYNC flag"
+	exit 1
+    fi
+
     runtime=$(echo "scale=2; ($end - $start) / 1" | bc -l )
     total_data=$(cat ${OUT_BASENAME}_* | cut -f 1 | SUM)
     avg_speed=$(echo "scale=2; $total_data / $runtime / 1000000000" | bc -l)
-- 
2.10.2