diff options
Diffstat (limited to 'recipes-kernel/cryptodev/sdk_patches/0076-exit-early-if-cryptodev-tests-are-not-installed.patch')
| -rw-r--r-- | recipes-kernel/cryptodev/sdk_patches/0076-exit-early-if-cryptodev-tests-are-not-installed.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/recipes-kernel/cryptodev/sdk_patches/0076-exit-early-if-cryptodev-tests-are-not-installed.patch b/recipes-kernel/cryptodev/sdk_patches/0076-exit-early-if-cryptodev-tests-are-not-installed.patch new file mode 100644 index 000000000..0570e1a21 --- /dev/null +++ b/recipes-kernel/cryptodev/sdk_patches/0076-exit-early-if-cryptodev-tests-are-not-installed.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | From 87214642cbfc6dbd43948940b5d1ce9528f451bd Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Cristian Stoica <cristian.stoica@nxp.com> | ||
| 3 | Date: Thu, 27 Oct 2016 10:46:01 +0300 | ||
| 4 | Subject: [PATCH 076/104] exit early if cryptodev tests are not installed | ||
| 5 | |||
| 6 | Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> | ||
| 7 | --- | ||
| 8 | tests/async_speed_multi.sh | 10 +++++++++- | ||
| 9 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git a/tests/async_speed_multi.sh b/tests/async_speed_multi.sh | ||
| 12 | index 862f39d..62c4759 100755 | ||
| 13 | --- a/tests/async_speed_multi.sh | ||
| 14 | +++ b/tests/async_speed_multi.sh | ||
| 15 | @@ -20,6 +20,7 @@ | ||
| 16 | # no user-configurable options below this line | ||
| 17 | |||
| 18 | NUM_CORES=$(nproc) | ||
| 19 | +CMD_BIN="async_speed" | ||
| 20 | OUT_BASENAME="async_speed" | ||
| 21 | MPSTAT_OUT="mpstat_out" | ||
| 22 | |||
| 23 | @@ -56,7 +57,7 @@ function run_parallel | ||
| 24 | trap control_c SIGINT | ||
| 25 | |||
| 26 | OPTIONS="-t $tvalue -n $nvalue -m" | ||
| 27 | - CMD="async_speed $OPTIONS $alg_name" | ||
| 28 | + CMD="$CMD_BIN $OPTIONS $alg_name" | ||
| 29 | |||
| 30 | if [ ! -z "$vvalue" ] | ||
| 31 | then | ||
| 32 | @@ -120,6 +121,13 @@ function main | ||
| 33 | [ ! -e "/dev/crypto" ] && | ||
| 34 | (sudo modprobe cryptodev || modprobe cryptodev || exit 1) | ||
| 35 | |||
| 36 | + $(which ${CMD_BIN} &> /dev/null) | ||
| 37 | + if (($? != 0)) | ||
| 38 | + then | ||
| 39 | + echo "${CMD_BIN} test is not installed" | ||
| 40 | + exit 1 | ||
| 41 | + fi | ||
| 42 | + | ||
| 43 | rm -f ${OUT_BASENAME}_* | ||
| 44 | rm -f ${MPSTAT_OUT} | ||
| 45 | |||
| 46 | -- | ||
| 47 | 2.10.2 | ||
| 48 | |||
