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# 15 16threads=1 17size=256 18iterations=1000000 19crypto="/tank/users/gnn/Repos/svn/FreeBSD.HEAD/tools/tools/crypto/cryptotest" 20max_threads=$2 21max_size=$3 22 23while [ "$threads" -le "$max_threads" ]; do 24 echo "Testing with $threads processes." 25 while [ "$size" -le "$max_size" ]; do 26 $crypto -t $threads -a $1 $iterations $size 27 size=$(($size * 2)) 28 done 29 size=256 30 threads=$(($threads * 2)) 31done 32