7 echo "Usage: $0 [serial]"
15 snum=`dmesg | grep 'on chaoskey' | tail -1 | sed 's/.*chaoskey \([0-9a-f][0-9a-f]*\) on chaoskey.*/\1/'`
21 serial="--serial $snum"
26 echo "Usage: $0 [serial]"
31 echo -e '\e[34mTesting ChaosKey' $snum '\e[39m'
33 tests="0:100 1:100 2:100 3:100 12:10 13:100 15:10000 16:250 202:1000 203:100 204:500 206:20 207:1000:32 209:1000"
38 ../ao-tools/ao-chaosread/ao-chaosread $serial --infinite --bytes | for test in $tests done; do
41 dnum=`echo $test | sed 's/:.*$//'`
42 tnum=`echo $test | sed 's/^[^:]*://'`
43 tnum=`echo $test | sed 's/^[^:]*://' | sed 's/:.*$//'`
44 nnum=`echo $test | sed 's/^.*://'`
45 opts="-d $dnum -t $tnum -n $nnum"
48 dnum=`echo $test | sed 's/:.*$//'`
49 tnum=`echo $test | sed 's/^.*://'`
50 opts="-d $dnum -t $tnum"
63 dieharder -g 200 $opts
66 done | while read result; do
69 testnum=`echo $result | sed 's/TEST //'`
78 echo test $testnum failed
82 echo pass $PASS weak $WEAK fail $FAIL
85 echo -e '\e[32m'ChaosKey $snum is ready to ship'\e[39m'
89 echo -e '\e[31m'ChaosKey $snum failed'\e[39m'