xref: /freebsd/tools/tools/crypto/cryptorun.sh (revision 076ad2f8)
1#!/bin/sh
2#
3# A simple test runner for cryptotest
4#
5# Althought cryptotest itself has a -z mode to test all algorithms at
6# a variety of sizes, this script allows us to be more selective.
7# Threads and buffer sizes move in powers of two from 1, for threads,
8# and 256 for buffer sizes.
9#
10# e.g.  cryptorun.sh aes 4 512
11#
12# Test aes with 1, 2 and 4 processes, and at sizes of 256 and 512 bytes.
13#
14# $FreeBSD$
15#
16
17threads=1
18size=256
19iterations=1000000
20crypto="/tank/users/gnn/Repos/svn/FreeBSD.HEAD/tools/tools/crypto/cryptotest"
21max_threads=$2
22max_size=$3
23
24while [ "$threads" -le "$max_threads" ]; do
25	echo "Testing with $threads processes."
26	while [ "$size" -le "$max_size" ]; do
27		$crypto -t $threads -a $1 $iterations $size
28		size=$(($size * 2))
29	done
30	size=256
31	threads=$(($threads * 2))
32done
33