From 57ca91fd955dd228f208000de1c2fa2bc4a0e317 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 26 Nov 2013 20:50:34 +0100 Subject: Adjustments to test scripts --- tests/loopback-test.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'tests/loopback-test.sh') diff --git a/tests/loopback-test.sh b/tests/loopback-test.sh index 7ae03a4..09bfc82 100755 --- a/tests/loopback-test.sh +++ b/tests/loopback-test.sh @@ -35,27 +35,42 @@ fi failed=0 send=0 errors=0 +err_num=0 + +print_iters=`expr 2 + 1024 '*' 100 / $size` read_size=`expr $multiplier '*' $size` echo "Starting..." i=1 + pci -w 0x9040 0x201 + while [ 1 ]; do + if [ $wait -gt 0 ]; then + pci -w 0x9040 0x1 + fi + pci -w dma1 -s $size "*0x$i" rm -f /tmp/camera-test.out - pci -r dma1 --multipacket -s $read_size -o /tmp/camera-test.out &> /dev/null + pci -r dma1 --wait --multipacket -s $read_size -o /tmp/camera-test.out -t 1000000 &> /dev/null if [ $wait -gt 0 ]; then wrdone=0 while [ $wrdone -eq 0 ]; do - pci --list-dma-engines +# pci --list-dma-engines pci --list-dma-engines | grep "DMA1 S2C" | grep "SD" #&> /dev/null wrdone=$? done + pci -w 0x9040 0x201 fi res=`compare /tmp/camera-test.out $read_size "$i" 6 2 6` if [ $? -eq 0 ]; then err_cnt=`echo $res | cut -f 1 -d ' '` + if [ "$err_cnt" -ne 0 ]; then + pci -r dma1 --wait --multipacket -o /tmp/camera-test.out -t 1000000 &> /dev/null + cp /tmp/camera-test.out /tmp/camera-test.out.$err_num + err_num=$(($err_num + 1)) + fi byte_cnt=`echo $res | cut -f 3 -d ' '` send=$(($send + $byte_cnt * 4)) errors=$(($errors + $err_cnt * 4)) @@ -64,8 +79,9 @@ while [ 1 ]; do fi i=$((i + 1)) - if [ $i -eq 100 ]; then + if [ $i -eq $print_iters ]; then echo "Data send: $send bytes, Errors: $errors bytes, Failed exchanges: $failed" +# pci -r 0x9070 -s 4 i=1 fi done -- cgit v1.2.3