This patch fixes the problem of the naming issue. Test cases that have
the same name will end up overwriting previous test cases when storing
the results in the data base. So this patch is to changes the test cases
names and to be more understandable.
Change-Id: Iab3aaf62aefb120b7a04d21bd83aabf7034e72f4
Signed-off-by: Khouloud Touil <ktouil@baylibre.com>
#!/bin/sh
#This test is writen taking the DRA7xx-EVM board as an example
#!/bin/sh
#This test is writen taking the DRA7xx-EVM board as an example
+#these tests will be skipped if 2 interfaces are not detected.
#Theorical values of bitrate is from 1Kbit/s to 1Mbit/s
#Real values to provide transmission are between 10797 bit/s and 1909090git bit/s
#Real values that doesn't provide transmission but belong to the domain are between 781 bit/s and 5209999 bit/s
if [ ! -e /sys/class/net/can1 ];then
#Theorical values of bitrate is from 1Kbit/s to 1Mbit/s
#Real values to provide transmission are between 10797 bit/s and 1909090git bit/s
#Real values that doesn't provide transmission but belong to the domain are between 781 bit/s and 5209999 bit/s
if [ ! -e /sys/class/net/can1 ];then
- lava-test-case canconfig_can0_bitrate --result skip
- lava-test-case receive_frames_through_can1 --result skip
- lava-test-case receive_frames_through_can1 --result skip
- lava-test-case receive_frames_through_can1 --result skip
- lava-test-case canconfig_can0_bitrate --result skip
- lava-test-case receive_frames_through_can1 --result skip
+ lava-test-case can0_bitrate_range_start --result skip
+ lava-test-case can1_bitrate_range_start --result skip
+ lava-test-case can1_xfer_config_range_start --result skip
+ lava-test-case can1_xfer_tx_range_start --result skip
+ lava-test-case can1_xfer_tx_range_end --result skip
+ lava-test-case can0_bitrate_range_end --result skip
ip link set can0 type can bitrate $b
x=$?
if [ $x -eq 0 ];then
ip link set can0 type can bitrate $b
x=$?
if [ $x -eq 0 ];then
- lava-test-case can0_bitrate --result pass --measurement $b --units bit/s
+ lava-test-case can0_bitrate_range_start --result pass --measurement $b --units bit/s
echo "$b is the first bitrate in the domain"
found_bitrate=1
ip link set can1 type can bitrate $b
if [ $? -eq 0 ];then
echo "$b is the first bitrate in the domain"
found_bitrate=1
ip link set can1 type can bitrate $b
if [ $? -eq 0 ];then
- lava-test-case can1_bitrate --result pass --measurement $b --units bit/s
+ lava-test-case can1_bitrate_range_start --result pass --measurement $b --units bit/s
- lava-test-case can1_bitrate --result fail --measurement $b --units bit/s
+ lava-test-case can1_bitrate_range_start --result fail --measurement $b --units bit/s
fi
sleep 2
ip link set can0 up
fi
sleep 2
ip link set can0 up
candump can1 > $file_can &
sleep 3
if [ -s $file_can ];then
candump can1 > $file_can &
sleep 3
if [ -s $file_can ];then
- lava-test-case Receive_can1 --result pass --measurement $b --units bit/s
+ lava-test-case can1_xfer_config_range_start --result pass --measurement $b --units bit/s
- lava-test-case Receive_can1 --result fail --measurement $b --units bit/s
+ lava-test-case can1_xfer_config_range_start --result fail --measurement $b --units bit/s
sleep 2
echo "This bitrate $b belongs to the domain but doesn't provide frames transmission"
fi
sleep 2
echo "This bitrate $b belongs to the domain but doesn't provide frames transmission"
fi
done
if [ $found_bitrate -eq 0 ];then
done
if [ $found_bitrate -eq 0 ];then
- lava-test-case can0_bitrate --result fail --measurement $b --units bit/s
+ lava-test-case can0_bitrate_range_start --result fail --measurement $b --units bit/s
sleep 2
echo "There is no supportable bitrate in this interval"
fi
sleep 2
echo "There is no supportable bitrate in this interval"
fi
sleep 4
if [ -s $file_can ];then
found_bitrate_for_transmisson=1
sleep 4
if [ -s $file_can ];then
found_bitrate_for_transmisson=1
- lava-test-case Receive_can1 --result pass --measurement $b --units bit/s
+ lava-test-case can1_xfer_tx_range_start --result pass --measurement $b --units bit/s
sleep 2
echo "$b is the first supportable bitrate to provide transmission"
rm $file_can
sleep 2
echo "$b is the first supportable bitrate to provide transmission"
rm $file_can
done
if [ $found_bitrate_for_transmisson -eq 0 ];then
done
if [ $found_bitrate_for_transmisson -eq 0 ];then
- lava-test-case Receive_can1 --result fail --measurement $b --units bit/s
+ lava-test-case can1_xfer_tx_range_start --result fail --measurement $b --units bit/s
sleep 2
echo "There is no bitrate in this interval to provide frames transmission"
fi
sleep 2
echo "There is no bitrate in this interval to provide frames transmission"
fi
size=$(stat -c %s $file_can)
if [ $size -eq 0 ];then
bitrate_no_transmission=1
size=$(stat -c %s $file_can)
if [ $size -eq 0 ];then
bitrate_no_transmission=1
- lava-test-case Receive_can1 --result pass --measurement $(($b-1)) --units bit/s
- lava-test-case Receive_can1 --result fail --measurement $b --units bit/s
+ lava-test-case can1_xfer_tx_range_end --result pass --measurement $(($b-1)) --units bit/s
sleep 2
echo "This bitrate $b doesn't provide frames transmission"
echo "The last bitrate to provide frames transmission is $(($b-1))"
sleep 2
echo "This bitrate $b doesn't provide frames transmission"
echo "The last bitrate to provide frames transmission is $(($b-1))"
done
if [ $bitrate_no_transmission -eq 0 ];then
done
if [ $bitrate_no_transmission -eq 0 ];then
- lava-test-case Receive_can1 --result pass --measurement $b --units bit/s
- echo "All bitrates in this interval provide frames transmission"
+ lava-test-case can1_xfer_tx_range_end --result fail --measurement $b --units bit/s
+ echo "All bitrates in this interval provide frames transmission, the last bitrate not found in this range"
ip link set can0 down
ip link set can1 down
fi
ip link set can0 down
ip link set can1 down
fi
sleep 2
if [ $x -ne 0 ];then
out_of_domain=1
sleep 2
if [ $x -ne 0 ];then
out_of_domain=1
- lava-test-case can0_bitrate --result fail --measurement $b --units bit/s
+ lava-test-case can0_bitrate_range_end --result pass --measurement $(($b-1)) --units bit/s
echo "$b is the first bitrate to be out of the domain"
echo "The last bitrate to belong to the domain is $(($b-1))"
break
echo "$b is the first bitrate to be out of the domain"
echo "The last bitrate to belong to the domain is $(($b-1))"
break
done
if [ $out_of_domain -eq 0 ];then
done
if [ $out_of_domain -eq 0 ];then
- lava-test-case can0_bitrate --result pass --measurement $b --units bit/s
+ lava-test-case can0_bitrate_range_end --result fail --measurement $b --units bit/s
echo "All bitrates in this interval belong to the domain"
canconfig can0 stop
canconfig can1 stop
echo "All bitrates in this interval belong to the domain"
canconfig can0 stop
canconfig can1 stop