numam-spdk/test/bdev/gen_crypto.sh
Karol Latecki 1ccc878e7f scripts: use -n instead of ! -z
Changing according to styling check done by ShellCheck.
Removing from check_format.sh exclusion list:
SC2236 - Use -n instead of ! -z
SC2070 - -n doesn't work with unquoted arguments. Quote or use [[ ]]

Change-Id: Ia9d645b9d0ce31b67c4de682395cf36f4ddc8d1f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463180
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-08-08 21:27:40 +00:00

28 lines
707 B
Bash
Executable File

#!/usr/bin/env bash
set -e
rootdir=$(readlink -f $(dirname $0))/../..
source "$rootdir/scripts/common.sh"
# base_bdev will use QAT if available, otherwise AESNI
# base_bdev2 will always use AESNI
# This makes sure that AESNI always gets tested, even if QAT is available.
base_bdev=$1
base_bdev2=$2
echo
echo "[crypto]"
if [ -n "$base_bdev" ]; then
if [ $(lspci -d:37c8 | wc -l) -eq 0 ]; then
echo " CRY $base_bdev crypto_ram 0123456789123456 crypto_aesni_mb"
else
echo " CRY $base_bdev crypto_ram 0123456789123456 crypto_qat"
fi
fi
if [ -n "$base_bdev2" ]; then
echo " CRY $base_bdev2 crypto_ram2 9012345678912345 crypto_aesni_mb"
fi