# @name Crypto Tests
# @desc Run tcrypt module to exercise HW crypto operations
# @requires crypto/crypto-omap
# @requires crypto/crypto-omap/des
# @setup_requires 

CRYPTO_S_PERF_DES source 'common.sh'; config_options=`get_modular_config_names.sh crypto`; check_config_options "ym" CONFIG_CRYPTO_HW $config_options; check_config_options "m" CONFIG_CRYPTO_TEST; echo /dev/null>/var/log/messages; crypto_ip=`get_crypto_ip.sh des`; IRQ_NUM=`get_irq_for_iface.sh -i $crypto_ip` || die "error getting irq for crypto"; PRE=`get_num_interrupts_for_irq.sh -i $IRQ_NUM -c 0`; modprobe tcrypt mode=502 sec=1; POST=`get_num_interrupts_for_irq.sh -i $IRQ_NUM -c 0`; [[ $POST -gt $(( $PRE+17000 )) ]]|| die "IRQ count did not increase, no hardware crypto, looking for irq number $IRQ_NUM, initial count $PRE, final count $POST";crypto_test.sh
