diff options
49 files changed, 1152 insertions, 169 deletions
diff --git a/android/ethernet-android.yaml b/android/ethernet-android.yaml new file mode 100644 index 0000000..d5b3c9f --- /dev/null +++ b/android/ethernet-android.yaml @@ -0,0 +1,26 @@ +metadata: + name: ethernet-android + format: "Lava-Test-Shell Test Definition 1.0" + description: "Test Ethernet on Linaro Android" + maintainer: + - botao.sun@linaro.org + os: + - android + devices: + - panda + - panda-es + - vexpress-a9 + - vexpress-tc2 + - arndale + scope: + - functional + +run: + steps: + - "./android/scripts/ethernet-android.sh" + +parse: + pattern: "(?P<test_case_id>[a-zA-Z0-9_-]+):\\s(?P<result>\\w+)" + fixupdict: + FAIL: fail + PASS: pass
\ No newline at end of file diff --git a/android/scripts/ethernet-android.sh b/android/scripts/ethernet-android.sh new file mode 100755 index 0000000..7c94fcb --- /dev/null +++ b/android/scripts/ethernet-android.sh @@ -0,0 +1,156 @@ +#!/system/bin/sh +# +# Ethernet test cases for Linaro Android +# +# Copyright (C) 2013, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Author: Botao Sun <botao.sun@linaro.org> + +function check_return_fail() { + if [ $? -ne 0 ]; then + fail_test "$1" + return 0 + else + return 1 + fi +} + +function fail_test() { + local reason=$1 + echo "${TEST}: FAIL - ${reason}" +} + +function pass_test() { + echo "${TEST}: PASS" +} + +## Test case definitions +# Check Ethernet can be disabled or not +test_disable_ethernet() { + TEST="disable_ethernet" + + echo `which busybox` + busybox ifconfig eth0 down + + if [ $? -ne 0 ]; then + fail_test "Ethernet disable failed" + return 1 + fi + + sleep 20 + + echo "###########################################" + busybox ifconfig -a + echo "###########################################" + + busybox ifconfig eth0 | grep "inet addr" + + if [ $? -ne 1 ]; then + fail_test "Ethernet IP address still exists" + return 1 + fi + + pass_test +} + +# Check Ethernet can be enabled or not +test_enable_ethernet() { + TEST="enable_ethernet" + + echo `which busybox` + busybox ifconfig eth0 up + + if [ $? -ne 0 ]; then + fail_test "Ethernet enable failed" + return 1 + fi + + sleep 20 + + echo "###########################################" + busybox ifconfig -a + echo "###########################################" + + busybox ifconfig eth0 | grep "inet addr" + + if [ $? -ne 0 ]; then + fail_test "Ethernet IP not found" + return 1 + fi + + pass_test +} + +# Ethernet ping test +test_ethernet_ping() { + TEST="ethernet_ping" + + echo `which busybox` + busybox ifconfig eth0 up + + sleep 20 + + echo "###########################################" + busybox ifconfig -a + echo "###########################################" + + busybox ifconfig eth0 | grep "inet addr" + if [ $? -ne 0 ]; then + fail_test "Ethernet IP not found" + return 1 + fi + + # Get ip address from Ethernet interface + ip_address_line=`busybox ifconfig eth0 | grep "inet addr"` + echo $ip_address_line + + ip_address_array=($ip_address_line) + ip_address_element=${ip_address_array[1]} + echo $ip_address_element + + ip_address=${ip_address_element:5} + echo $ip_address + + # Ping test here + ping -c 5 -I ${ip_address} www.google.com + if [ $? -ne 0 ]; then + fail_test "Ping test failed from $ip_address" + return 1 + fi + + # Packet loss report + packet_loss_line=`ping -c 5 -I ${ip_address} www.google.com | grep "packet loss"` + echo $packet_loss_line + + packet_loss_array=($packet_loss_line) + packet_loss=${packet_loss_array[5]} + echo "The packet loss rate is $packet_loss" + + if [ "$packet_loss" != "0%" ]; then + fail_test "Packet loss happened, rate is $packet_loss" + return 1 + fi + + pass_test +} + +# run the tests +test_disable_ethernet +test_enable_ethernet +test_ethernet_ping +# clean exit so lava-test can trust the results +exit 0
\ No newline at end of file diff --git a/android/scripts/sd-mmc.sh b/android/scripts/sd-mmc.sh new file mode 100755 index 0000000..81cb5b3 --- /dev/null +++ b/android/scripts/sd-mmc.sh @@ -0,0 +1,114 @@ +#!/system/bin/sh +# +# SD MMC test cases for Linaro Android +# +# Copyright (C) 2013, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Author: Botao Sun <botao.sun@linaro.org> + +function check_return_fail() { + if [ $? -ne 0 ]; then + fail_test "$1" + return 0 + else + return 1 + fi +} + +function fail_test() { + local reason=$1 + echo "${TEST}: FAIL - ${reason}" +} + +function pass_test() { + echo "${TEST}: PASS" +} + +## Test case definitions +# Check if EXTERNAL_STORAGE is available +test_has_variable_external_storage() { + TEST="has_variable_external_storage" + + # Add 1 minute sleep time to avoid SD card partition is unavailable during the system boot + sleep 60 + + if [ -z "$EXTERNAL_STORAGE" ]; then + fail_test "The value of EXTERNAL_STORAGE is empty" + return 1 + fi + + echo "The value of EXTERNAL_STORAGE is $EXTERNAL_STORAGE" + + pass_test +} + +# Print the output of "df" command +test_print_df_output() { + TEST="print_df_output" + + df_return=`df` + if [ $? -ne 0 ]; then + fail_test "Run df command failed" + return 1 + fi + + if [ -z "$df_return" ]; then + fail_test "The return value of df command is empty" + return 1 + else + echo "$df_return" + fi + + pass_test +} + +# Write to SD card partition +test_write_on_sd_card() { + TEST="write_on_sd_card" + + if [ ! -d "$EXTERNAL_STORAGE" ]; then + fail_test "Unable to find $EXTERNAL_STORAGE" + return 1 + fi + + written_message="abcdefghijklmn" + echo $written_message > $EXTERNAL_STORAGE/sd-mmc-test.txt + + if [ ! -f "$EXTERNAL_STORAGE/sd-mmc-test.txt" ]; then + fail_test "Failed to write to external storage $EXTERNAL_STORAGE" + return 1 + fi + + file_content=`cat $EXTERNAL_STORAGE/sd-mmc-test.txt` + + if [ "$file_content" != "$written_message" ]; then + fail_test "Writing test on SD card failed, original string doesn't match the result" + return 1 + fi + + echo "The content of SD MMC test file is: $file_content" + + pass_test +} + +# run the tests +test_has_variable_external_storage +test_print_df_output +test_write_on_sd_card + +# clean exit so lava-test can trust the results +exit 0
\ No newline at end of file diff --git a/android/sd-mmc.yaml b/android/sd-mmc.yaml new file mode 100644 index 0000000..f675610 --- /dev/null +++ b/android/sd-mmc.yaml @@ -0,0 +1,26 @@ +metadata: + name: sd-mmc + format: "Lava-Test-Shell Test Definition 1.0" + description: "Test SD MMC on Linaro Android" + maintainer: + - botao.sun@linaro.org + os: + - android + devices: + - panda + - panda-es + - vexpress-a9 + - vexpress-tc2 + - arndale + scope: + - functional + +run: + steps: + - "./android/scripts/sd-mmc.sh" + +parse: + pattern: "(?P<test_case_id>[a-zA-Z0-9_-]+):\\s(?P<result>\\w+)" + fixupdict: + FAIL: fail + PASS: pass diff --git a/common/scripts/is-cpu-isolated.sh b/common/scripts/is-cpu-isolated.sh index 0ff03cf..f204634 100755 --- a/common/scripts/is-cpu-isolated.sh +++ b/common/scripts/is-cpu-isolated.sh @@ -3,6 +3,7 @@ # Variable decided outcome of test, this is the minimum isolation we need. MIN_ISOLATION=10 RESULT="PASS" +STRESS_DURATION=5000 if [ $2 ]; then MIN_ISOLATION=$2 @@ -46,9 +47,18 @@ get_isolation_duration() { isdebug echo "initial count: " $new_count old_count=$new_count + T2="$(date +%s)" while [ $new_count -eq $old_count ] do new_count=$(get_tick_count) + ps h -C stress -o pid > /dev/null + if [ $? != 0 ]; then + T=$(($(date +%s)-$T2)) + echo "Tick didn't got updated for stress duration:" $T + echo "Probably in infinite mode, quiting test" + echo "test_case_id:Min-isolation "$MIN_ISOLATION" secs result:"$RESULT" measurement:"$STRESS_DURATION" units:secs" + exit + fi done isdebug echo "count locked: " $new_count @@ -75,9 +85,18 @@ get_isolation_duration() { new_count=$old_count + T2="$(date +%s)" while [ $new_count -eq $old_count ] do new_count=$(get_tick_count) + ps h -C stress -o pid > /dev/null + if [ $? != 0 ]; then + T=$(($(date +%s)-$T2)) + echo "Tick didn't got updated for stress duration:" $T + echo "Probably in infinite mode, quiting test" + echo "test_case_id:Min-isolation "$MIN_ISOLATION" secs result:PASS measurement:"$T" units:secs" + exit + fi done isdebug echo "sampling over: " $new_count @@ -186,10 +205,24 @@ isolate_cpu1() { # But disallow load balancing within the NOHZ domain echo 0 > /dev/cpuset/rt/sched_load_balance - # Start a single threaded task on CPU1 or RT group - echo $$ > /dev/cpuset/rt/tasks - stress -q --cpu 1 --timeout 2000 & - echo $$ > /dev/cpuset/gp/tasks + stress -q --cpu 1 --timeout $STRESS_DURATION & + + # Restart CPU1 to migrate all tasks to CPU0 + echo 0 > /sys/devices/system/cpu/cpu1/online + echo 1 > /sys/devices/system/cpu/cpu1/online + + # Setup the NOHZ domain again: CPU1 + echo 0 > /dev/cpuset/rt/mems + echo 1 > /dev/cpuset/rt/cpus + + # Try to move all processes in top set to the GP set. + for pid in `ps h -C stress -o pid`; do + echo $pid > /dev/cpuset/rt/tasks 2>/dev/null + if [ $? != 0 ]; then + isdebug echo -n "RT: Cannot move PID $pid: " + isdebug echo "$(cat /proc/$pid/status | grep ^Name | cut -f2)" + fi + done } clear_cpusets() { diff --git a/common/scripts/kvm/test-kvm.sh b/common/scripts/kvm/test-kvm.sh index 2df1c7d..37f4e29 100755 --- a/common/scripts/kvm/test-kvm.sh +++ b/common/scripts/kvm/test-kvm.sh @@ -11,11 +11,11 @@ if [ "x$1" = "xbenchmark" ]; then KVM_BOOT="$KVM_BOOT 0 none" fi -dmesg|grep 'Hyp mode initialized successfully' && echo "$KVM_INIT pass" || echo "$KVM_INIT fail" +dmesg|grep 'Hyp mode initialized successfully' && echo "$KVM_INIT 0 pc pass" || echo "$KVM_INIT 0 pc fail" if hash curl 2>/dev/null; then - EXTRACT_BUILD_NUMBER="curl -s" - DOWNLOAD_FILE="curl -SO" + EXTRACT_BUILD_NUMBER="curl -sk" + DOWNLOAD_FILE="curl -SOk" else EXTRACT_BUILD_NUMBER="wget -q --no-check-certificate -O -" DOWNLOAD_FILE="wget --progress=dot -e dotbytes=2M --no-check-certificate" @@ -42,14 +42,14 @@ if [ "x$1" = "xbenchmark" ]; then else cp /usr/bin/hackbench /mnt/usr/bin/hackbench cp common/scripts/kvm/test-rt-tests.sh /mnt/root/test-rt-tests.sh - TEST_SCRIPT=/root/test-rt-tests.sh + TEST_SCRIPT='/root/test-rt-tests.sh guest' fi cat >> /mnt/usr/bin/test-guest.sh <<EOF #!/bin/sh exec > /root/guest.log 2>&1 - echo "$KVM_BOOT pass" - ping -W 4 -c 10 192.168.1.10 && echo "$KVM_GUEST_NET pass" || echo "$KVM_GUEST_NET fail" + echo "$KVM_BOOT 0 pc pass" + ping -W 4 -c 10 192.168.1.10 && echo "$KVM_GUEST_NET 0 pc pass" || echo "$KVM_GUEST_NET 0 pc fail" sh $TEST_SCRIPT EOF chmod a+x /mnt/usr/bin/test-guest.sh @@ -67,7 +67,7 @@ brctl addif br0 eth0 brctl addif br0 tap0 udhcpc -t 10 -i br0 -ping -W 4 -c 10 192.168.1.10 && echo "$KVM_HOST_NET pass" || echo "$KVM_HOST_NET fail" +ping -W 4 -c 10 192.168.1.10 && echo "$KVM_HOST_NET 0 pc pass" || echo "$KVM_HOST_NET 0 pc fail" qemu-system-arm -smp 2 -m 1024 -cpu cortex-a15 -M vexpress-a15 \ -kernel ./zImage -dtb ./vexpress-v2p-ca15-tc1.dtb \ @@ -83,10 +83,12 @@ mount /dev/nbd0p2 /mnt/ if ! grep -q "kvm-boot-1:" /mnt/root/guest.log then - echo "$KVM_BOOT fail" + echo "$KVM_BOOT 0 pc fail" fi cat /mnt/root/guest.log +cp /mnt/*.txt . +cp /mnt/root/guest.log . umount /mnt sync diff --git a/common/scripts/kvm/test-rt-parse.sh b/common/scripts/kvm/test-rt-parse.sh new file mode 100755 index 0000000..3e833d5 --- /dev/null +++ b/common/scripts/kvm/test-rt-parse.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ -f ./common/scripts/min_max_avg_parse.py ] +then + PARSE_SCRIPT=./common/scripts/min_max_avg_parse.py +elif [-f /root/min_max_avg_parse.py ] +then + PARSE_SCRIPT=/root/min_max_avg_parse.py +fi +for FILE in *.txt +do + $PARSE_SCRIPT $FILE "Time:" "Seconds" +done diff --git a/common/scripts/kvm/test-rt-tests.sh b/common/scripts/kvm/test-rt-tests.sh index bee295d..e378c9d 100755 --- a/common/scripts/kvm/test-rt-tests.sh +++ b/common/scripts/kvm/test-rt-tests.sh @@ -1,32 +1,7 @@ -/usr/bin/hackbench -l 100 -T -/usr/bin/hackbench -l 100 -P -/usr/bin/hackbench -l 10000 -T -/usr/bin/hackbench -l 10000 -P -/usr/bin/hackbench -l 100 -T -f 10 -/usr/bin/hackbench -l 100 -P -f 10 -/usr/bin/hackbench -l 10000 -T -f 10 -/usr/bin/hackbench -l 10000 -P -f 10 -/usr/bin/hackbench -s 64 -l 100 -T -f 10 -/usr/bin/hackbench -s 64 -l 100 -P -f 10 -/usr/bin/hackbench -s 64 -l 100 -T -f 20 -/usr/bin/hackbench -s 64 -l 100 -P -f 20 -/usr/bin/hackbench -s 64 -l 100 -T -f 30 -/usr/bin/hackbench -s 64 -l 100 -P -f 30 -/usr/bin/hackbench -s 64 -l 100 -T -f 40 -/usr/bin/hackbench -s 64 -l 100 -P -f 40 -/usr/bin/hackbench -s 1024 -l 100 -T -f 10 -/usr/bin/hackbench -s 1024 -l 100 -P -f 10 -/usr/bin/hackbench -s 1024 -l 100 -T -f 20 -/usr/bin/hackbench -s 1024 -l 100 -P -f 20 -/usr/bin/hackbench -s 1024 -l 100 -T -f 30 -/usr/bin/hackbench -s 1024 -l 100 -P -f 30 -/usr/bin/hackbench -s 1024 -l 100 -T -f 40 -/usr/bin/hackbench -s 1024 -l 100 -P -f 40 -/usr/bin/hackbench -s 4096 -l 100 -T -f 10 -/usr/bin/hackbench -s 4096 -l 100 -P -f 10 -/usr/bin/hackbench -s 4096 -l 100 -T -f 20 -/usr/bin/hackbench -s 4096 -l 100 -P -f 20 -/usr/bin/hackbench -s 4096 -l 100 -T -f 30 -/usr/bin/hackbench -s 4096 -l 100 -P -f 30 -/usr/bin/hackbench -s 4096 -l 100 -T -f 40 -/usr/bin/hackbench -s 4096 -l 100 -P -f 40 +/usr/bin/hackbench 100 process 500 | tee $1_hackbench_l500_p_g100_res.txt +/usr/bin/hackbench 100 process 500 | tee -a $1_hackbench_l500_p_g100_res.txt +/usr/bin/hackbench 100 process 500 | tee -a $1_hackbench_l500_p_g100_res.txt +/usr/bin/hackbench 100 process 500 | tee -a $1_hackbench_l500_p_g100_res.txt +/usr/bin/hackbench 100 process 500 | tee -a $1_hackbench_l500_p_g100_res.txt +/usr/bin/hackbench 100 process 500 | tee -a $1_hackbench_l500_p_g100_res.txt +/usr/bin/hackbench 100 process 500 | tee -a $1_hackbench_l500_p_g100_res.txt diff --git a/common/scripts/ltp-realtime2LAVA.py b/common/scripts/ltp-realtime2LAVA.py new file mode 100755 index 0000000..f5f41fa --- /dev/null +++ b/common/scripts/ltp-realtime2LAVA.py @@ -0,0 +1,197 @@ +#!/usr/bin/python +import re +import sys +import fileinput + +#extract a standard results block from the stream +def standard_results (): + minimum = re.compile("^Min:\s+(?P<min>[\d\.]+)\s+(?P<units>\w+)") + maximum = re.compile("^Max:\s+(?P<max>[\d\.]+)\s+(?P<units>\w+)") + average = re.compile("^Avg:\s+(?P<average>[\d\.]+)\s+(?P<units>\w+)") + standarddev = re.compile("^StdDev:\s+(?P<stddev>[\d\.]+)\s+(?P<units>\w+)") + finished=0 + for line in sys.stdin: + for parser in [maximum,minimum,average,standarddev]: + result = parser.search(line) + if result is not None: + if parser is minimum: + test_min = result.group('min') + units = result.group('units') + print "test_case_id:%s%s min measurement:%s units:%s result:skip" % (test_name, test_args, test_min, units) + finished += 1 + break + if parser is maximum: + test_max = result.group('max') + units = result.group('units') + finished += 1 + print "test_case_id:%s%s max measurement:%s units:%s result:skip" % (test_name, test_args, test_max, units) + break + if parser is average: + test_avg = result.group('average') + units = result.group('units') + print "test_case_id:%s%s avg measurement:%s units:%s result:skip" % (test_name, test_args, test_avg, units) + finished += 1 + break + if parser is standarddev: + test_stddev = result.group('stddev') + units = result.group('units') + print "test_case_id:%s%s stddev measurement:%s units:%s result:skip" % (test_name, test_args, test_stddev, units) + finished += 1 + break + else: + continue + if finished ==4: + return + + print "ERROR: Parser failed and ran to EOF" + sys.exit(-1) + +def result_results (): + results = re.compile("Result:\s+(?P<result>\w+)") + finished=0 + for line in sys.stdin: + for parser in [results]: + result = parser.search(line) + if result is not None: + if parser is results: + test_result = result.group('result') + print "test_case_id:%s%s_test measurement:0 units:none result:%s" % (test_name, test_args, test_result) + finished += 1 + break + else: + continue + if finished ==1: + return + + print "ERROR: Parser failed and ran to EOF" + sys.exit(-1) + + +def sched_jitter_results (): + maximum = re.compile("^max jitter:\s+(?P<max>[\d\.]+)\s+(?P<units>\w+)") + finished=0 + for line in sys.stdin: + for parser in [maximum]: + result = parser.search(line) + if result is not None: + if parser is maximum: + test_max = result.group('max') + units = result.group('units') + print "test_case_id:%s%s max jitter measurement:%s units:%s result:skip" % (test_name, test_args, test_max, units) + finished += 1 + break + else: + continue + if finished ==1: + #print "min:%s max:%s avg:%s stddev:%s" % (test_min, test_max, test_avg, test_stddev) + return + + print "ERROR: Parser failed and ran to EOF" + sys.exit(-1) + +def pi_perf_results (): + minimum = re.compile("^Min delay =\s+(?P<min>[\d\.]+)\s+(?P<units>\w+)") + maximum = re.compile("^Max delay =\s+(?P<max>[\d\.]+)\s+(?P<units>\w+)") + average = re.compile("^Average delay =\s+(?P<average>[\d\.]+)\s+(?P<units>\w+)") + standarddev = re.compile("^Standard Deviation =\s+(?P<stddev>[\d\.]+)\s+(?P<units>\w+)") + finished=0 + for line in sys.stdin: + for parser in [maximum,minimum,average,standarddev]: + result = parser.search(line) + if result is not None: + if parser is minimum: + test_min = result.group('min') + units = result.group('units') + print "test_case_id:%s%s min measurement:%s units:%s result:skip" % (test_name, test_args, test_min, units) + finished += 1 + break + if parser is maximum: + test_max = result.group('max') + units = result.group('units') + print "test_case_id:%s%s max measurement:%s units:%s result:skip" % (test_name, test_args, test_max, units) + finished += 1 + break + if parser is average: + test_avg = result.group('average') + units = result.group('units') + print "test_case_id:%s%s avg measurement:%s units:%s result:skip" % (test_name, test_args, test_avg, units) + finished += 1 + break + if parser is standarddev: + test_stddev = result.group('stddev') + units = result.group('units') + print "test_case_id:%s%s stddev measurement:%s units:%s result:skip" % (test_name, test_args, test_stddev, units) + finished += 1 + break + else: + continue + if finished ==4: + return + + print "ERROR: Parser failed and ran to EOF" + sys.exit(-1) + +def do_nothing (): + return + +#names of the test parsed out fo the input stream, converted to functioncalls +def async_handler(): + standard_results() + result_results() +def tc_2(): + result_results() +def gtod_latency(): + standard_results() +def periodic_cpu_load_single(): + standard_results() +def sched_latency(): + standard_results() +def sched_jitter(): + sched_jitter_results() +def sched_football(): + result_results() +def rt_migrate(): + result_results() +def pthread_kill_latency(): + standard_results() + result_results() +def prio_wake(): + result_results() +def pi_perf(): + pi_perf_results() +def prio_preempt(): + result_results() +def matrix_mult(): + result_results() +def periodic_cpu_load(): + result_results() +def async_handler_jk(): + result_results() + +#Parse the input stream and tuen test names into function calls to parse their +#details + +test_start = re.compile("--- Running testcase (?P<name>[a-zA-Z0-9_-]+)\s+(?P<args>[a-zA-Z0-9_.\- ]*?)\s*---") +test_finish = re.compile("The .* test appears to have completed.") + +for line in sys.stdin: + for parser in [test_start,test_finish]: + result = parser.search(line) + if result is not None: + if parser is test_start: + test_name = result.group('name') + func_name = result.group('name') + func_name = func_name.replace("-","_") + test_args = result.group('args') + test_args = test_args.replace(" ","-") + print + print " test_start= " + test_name + test_args + globals()[func_name]() + break + + if parser is test_finish: + print " test_finished= " + test_name + test_args + break + else: + continue + diff --git a/common/scripts/min_max_avg_parse.py b/common/scripts/min_max_avg_parse.py index 7518049..9b58f37 100755 --- a/common/scripts/min_max_avg_parse.py +++ b/common/scripts/min_max_avg_parse.py @@ -6,7 +6,7 @@ from numpy import * values = [] -r = re.compile(sys.argv[2]+"\s+(?P<measurement>[0-9.])") +r = re.compile(sys.argv[2]+"\s+(?P<measurement>[0-9.]+)") f = open(sys.argv[1], "r") for line in f.readlines(): search = r.search(line) diff --git a/common/scripts/pm-qa.sh b/common/scripts/pm-qa.sh index 444826b..e9a6576 100755 --- a/common/scripts/pm-qa.sh +++ b/common/scripts/pm-qa.sh @@ -35,9 +35,10 @@ test_func(){ pwd_dir=$PWD echo $pwd - tests_dirs="cpuidle cpufreq cpuhotplug sched_mc suspend thermal utils" + tests_dirs="cpuidle cpufreq cpuhotplug suspend thermal utils" for dir in $tests_dirs; do + var=$dir'_sanity.sh' subDir=${pwd_dir}/$dir if [ -d $subDir ]; then cd $subDir @@ -46,6 +47,12 @@ test_func(){ fi echo `pwd` + + /system/bin/sh $var + if [ $? -ne 0 ]; then + continue + fi + for file in `find . -name "*.sh"`; do path=$file echo $path diff --git a/openembedded/acpi-smoke-test.yaml b/openembedded/acpi-smoke-test.yaml new file mode 100644 index 0000000..7fb54e3 --- /dev/null +++ b/openembedded/acpi-smoke-test.yaml @@ -0,0 +1,16 @@ +metadata: + name: acpi-smoke-test + format: "Lava-Test-Shell Test Definition 1.0" + description: "Testing for the presence of ACPI" + maintainer: + - timothy.anzaku@linaro.org + os: + - openembedded + scope: + - functional + devices: + - rtsm_fvp_base_cortex-a57x1-a53x1 + - rtsm_fvp_base-aemv8a +run: + steps: + - "./openembedded/scripts/acpi-smoke-test.sh" diff --git a/openembedded/busybox.yaml b/openembedded/busybox.yaml index ea4f35a..1eb9563 100644 --- a/openembedded/busybox.yaml +++ b/openembedded/busybox.yaml @@ -11,13 +11,9 @@ metadata: devices: - rtsm_ve-armv8 -install: - git-repos: - - git://git.linaro.org/qa/test-definitions.git - run: steps: - - "cd test-definitions/openembedded/scripts" + - "cd openembedded/scripts" - "./busybox.sh" parse: diff --git a/openembedded/ethernet.yaml b/openembedded/ethernet.yaml index 3017c4b..c685116 100644 --- a/openembedded/ethernet.yaml +++ b/openembedded/ethernet.yaml @@ -11,13 +11,9 @@ metadata: devices: - rtsm_ve-armv8 -install: - git-repos: - - git://git.linaro.org/qa/test-definitions.git - run: steps: - - "cd test-definitions/openembedded/scripts" + - "cd openembedded/scripts" - "./ethernet.sh" parse: diff --git a/openembedded/jtreg/exclude.txt b/openembedded/jtreg/exclude.txt index 80dfc94..9cc7e44 100644 --- a/openembedded/jtreg/exclude.txt +++ b/openembedded/jtreg/exclude.txt @@ -1,10 +1,29 @@ +# Added: Fri Feb 7 2014 +# ---------------------- +gc/g1/TestHumongousCodeCacheRoots generic-all + +# Added: Wed Feb 5 2014 +# ---------------------- +compiler/regalloc/C1ObjectSpillInLogicOp.java generic-all +gc/TestSystemGC.java generic-all +gc/arguments/TestMaxNewSize.java generic-all +gc/g1/TestHumongousAllocInitialMark.java generic-all +runtime/8001071/Test8001071.java generic-all +java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java generic-all + +# Added: Mon Feb 3 2014 +# ---------------------- +# The following tests fail on both the x86_64 baseline and on aarch64. +compiler/7141637/SpreadNullArg.java generic-all +compiler/jsr292/ConcurrentClassLoadingTest.java generic-all +runtime/7107135/Test7107135.sh generic-all +runtime/ClassFile/OomWhileParsingRepeatedJsr.java generic-all + # These tests all require the G1 Garbage Collector, which is not # implemented in the aarch64-port. They are guaranteed to fail. # Unfortunately, some of them run multiple tests with multiple garbage # collectors, but as soon as they get to the G1 collector, they abort # with an Unimplemented assertion. - -gc/7168848/HumongousAlloc.java generic-all gc/8000311/Test8000311.java generic-all gc/arguments/TestAlignmentToUseLargePages.java generic-all gc/arguments/TestG1HeapRegionSize.java generic-all @@ -15,7 +34,6 @@ gc/g1/TestPrintGCDetails.java generic-all gc/g1/TestPrintRegionRememberedSetInfo.java generic-all gc/g1/TestRegionAlignment.java generic-all gc/g1/TestShrinkToOneRegion.java generic-all -gc/g1/TestSummarizeRSetStats.java generic-all gc/metaspace/G1AddMetaspaceDependency.java generic-all gc/metaspace/TestMetaspacePerfCounters.java generic-all gc/startup_warnings/TestG1.java generic-all @@ -24,7 +42,6 @@ gc/TestG1ZeroPGCTJcmdThreadPrint.java generic-all # I cranked up the timeout to -timeout:3 (3 times the expected) and # still got timeout errors on the foundation model with the following # tests: - compiler/5091921/Test6850611.java generic-all compiler/5091921/Test6905845.java generic-all compiler/5091921/Test6931567.java generic-all @@ -37,9 +54,6 @@ compiler/7100757/Test7100757.java generic-all compiler/7184394/TestAESMain.java generic-all compiler/7196199/Test7196199.java generic-all -# this test uses an option that is only accepted by a fastdebug build -compiler/print/PrintInlining.java generic-all - # this test also fails on x86-64 reference; I suspect that this is a Java 8 issue compiler/whitebox/IsMethodCompilableTest.java generic-all @@ -55,12 +69,15 @@ runtime/InitialThreadOverflow/testme.sh generic-all # also fails on x86-64 reference; suspect this is a Java 8 issue, since bad jar file in classpath is now rejected. runtime/LoadClass/LoadClassNegative.java generic-all -# There are also a couple of tests which time out on aarch64, which -# could contribute to the overall job timeout: -runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java generic-all -runtime/CDSCompressedKPtrs/XShareAuto.java generic-all - # This collector is not implemented for server; for simplicity also ignoring on client tests. gc/concurrentMarkSweep/CheckAllocateAndSystemGC.java generic-all gc/concurrentMarkSweep/GuardShrinkWarning.java generic-all gc/concurrentMarkSweep/SystemGCOnForegroundCollector.java generic-all + +# Removed: Mon Feb 3 2014 +# ------------------------ +# compiler/7116216/StackOverflow.java +# compiler/print/PrintInlining.java +# gc/g1/TestSummarizeRSetStats.java +# runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java +# runtime/CDSCompressedKPtrs/XShareAuto.java diff --git a/openembedded/kernel-version.yaml b/openembedded/kernel-version.yaml index efe2365..9a3826a 100644 --- a/openembedded/kernel-version.yaml +++ b/openembedded/kernel-version.yaml @@ -11,13 +11,9 @@ metadata: devices: - rtsm_ve-armv8 -install: - git-repos: - - git://git.linaro.org/qa/test-definitions.git - run: steps: - - "cd test-definitions/openembedded/scripts" + - "cd openembedded/scripts" - "./kernel-version.sh" parse: diff --git a/openembedded/ltp-realtime.yaml b/openembedded/ltp-realtime.yaml index f1bb1e5..9e32060 100644 --- a/openembedded/ltp-realtime.yaml +++ b/openembedded/ltp-realtime.yaml @@ -17,12 +17,10 @@ run: steps: - 'cd /opt/ltp' - 'export LTP_REALTIME_TESTS_TO_RUN="func/async_handler func/gtod_latency func/hrtimer-prio func/matrix_mult func/measurement func/periodic_cpu_load func/pi_perf func/prio-preempt func/prio-wake func/pthread_kill_latency func/rt-migrate func/sched_football func/sched_jitter func/sched_latency func/thread_clock"' - - 'for TEST_TO_RUN in ${LTP_REALTIME_TESTS_TO_RUN} ; do ./testscripts/test_realtime.sh -t $TEST_TO_RUN ; done' - - 'for FILE in $(find testcases/realtime/logs -type f) ; do mv $FILE $(dirname $FILE)/$(echo $FILE | sed "s:.*2[0-9]*-[0-9]*-[0-9]*-::g"); done;' - - 'grep -r Result: ./testcases/realtime/logs | sed "s:.*/::g"' + - 'for TEST_TO_RUN in ${LTP_REALTIME_TESTS_TO_RUN} ; do ./testscripts/test_realtime.sh -t $TEST_TO_RUN | /lava/tests/0_ltp-realtime/common/scripts/ltp-realtime2LAVA.py; done' parse: - pattern: "^(?P<test_case_id>.+).log:Result: (?P<result>.+)" + "pattern": "^test_case_id:(?P<test_case_id>.+)\\s+measurement:(?P<measurement>[\\d\\.]+)\\s+units:(?P<units>\\w+)\\s+result:(?P<result>\\w+)" fixupdict: FAIL: fail PASS: pass diff --git a/openembedded/ltp.yaml b/openembedded/ltp.yaml index 9dc4c8f..446b31f 100644 --- a/openembedded/ltp.yaml +++ b/openembedded/ltp.yaml @@ -14,14 +14,14 @@ metadata: - rtsm_ve-armv8 params: - TST_CMDFILES: syscalls,mm,math,timers,fcntl-locktests,ipc,fsx,fs,hugetlb + TST_CMDFILES: syscalls,mm,math,timers,fcntl-locktests,ipc,fsx,fs,hugetlb,io,timers,nptl,pty,containers,fs_bind,filecaps,admin_tools,connectors run: steps: - './openembedded/scripts/ltpfixup.sh $TST_CMDFILES' parse: - pattern: "^(?P<test_case_id>\\S+)\\s+(?P<result>\\w+)\\s+.+" + pattern: "^(?!.+ED)(?P<test_case_id>\\w+)\\s+(?P<result>\\w+)\\s+\\d$" fixupdict: FAIL: fail PASS: pass diff --git a/openembedded/mauve-setup.yaml b/openembedded/mauve-setup.yaml index f8c72f0..7466551 100644 --- a/openembedded/mauve-setup.yaml +++ b/openembedded/mauve-setup.yaml @@ -18,5 +18,5 @@ install: - git://git.linaro.org/leg/openjdk/mauve.git run: steps: - - 'cp -a /lava/tests/$TESTRUN_ID/mauve $HOME' + - 'mv /lava/tests/$TESTRUN_ID/mauve $HOME' - 'lava-test-case mauve-setup --result pass' diff --git a/openembedded/mysql.yaml b/openembedded/mysql.yaml index 654560e..b79460a 100644 --- a/openembedded/mysql.yaml +++ b/openembedded/mysql.yaml @@ -11,13 +11,9 @@ metadata: devices: - rtsm_ve-armv8 -install: - git-repos: - - git://git.linaro.org/qa/test-definitions.git - run: steps: - - "cd test-definitions/openembedded/scripts" + - "cd openembedded/scripts" - "./mysql.sh" parse: diff --git a/openembedded/openjdk8-sanity.yaml b/openembedded/openjdk8-sanity.yaml index dbe66b2..69a50fe 100644 --- a/openembedded/openjdk8-sanity.yaml +++ b/openembedded/openjdk8-sanity.yaml @@ -12,13 +12,9 @@ metadata: devices: - rtsm_ve-armv8 -install: - git-repos: - - git://git.linaro.org/qa/test-definitions.git - run: steps: - - 'cd test-definitions/openembedded/scripts' + - 'cd openembedded/scripts' - 'PATH=/usr/lib/jvm/java-8-openjdk/bin:/usr/lib/jvm/java-8-openjdk/jre/bin:$PATH' - './openjdk-version.sh 1.8' diff --git a/openembedded/phpinfo.yaml b/openembedded/phpinfo.yaml index 8243ed8..5fe9a36 100644 --- a/openembedded/phpinfo.yaml +++ b/openembedded/phpinfo.yaml @@ -9,13 +9,9 @@ metadata: devices: - rtsm_ve-armv8 -install: - git-repos: - - git://git.linaro.org/qa/test-definitions.git - run: steps: - - "cd test-definitions/openembedded/scripts" + - "cd openembedded/scripts" - "./phpinfo.sh" parse: diff --git a/openembedded/phpmysql.yaml b/openembedded/phpmysql.yaml index e1b561d..e249a3e 100644 --- a/openembedded/phpmysql.yaml +++ b/openembedded/phpmysql.yaml @@ -9,13 +9,9 @@ metadata: devices: - rtsm_ve-armv8 -install: - git-repos: - - git://git.linaro.org/qa/test-definitions.git - run: steps: - - "cd test-definitions/openembedded/scripts" + - "cd openembedded/scripts" - "./phpmysql.sh" parse: diff --git a/openembedded/scripts/acpi-smoke-test.sh b/openembedded/scripts/acpi-smoke-test.sh new file mode 100755 index 0000000..176c811 --- /dev/null +++ b/openembedded/scripts/acpi-smoke-test.sh @@ -0,0 +1,48 @@ +#! /bin/bash +# +# Test ACPI Support in UEFI on v7 and v8 +# +# Copyright (C) 2012, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# +DSDTPASS= +echo -n "Testing presence of /sys/firmware/acpi: " +if [ -d /sys/firmware/acpi ]; then + lava-test-case sys-firmware-acpi-present --result pass +else + lava-test-case sys-firmware-acpi-present --result fail +fi +echo -n "Testing presence of /sys/firmware/acpi/tables/DSDT: " +if [ -f /sys/firmware/acpi/tables/DSDT ]; then + lava-test-case sys-firmware-acpi-tables-DSDT --result pass + DSDTPASS=pass +else + lava-test-case sys-firmware-acpi-tables-DSDT --result fail +fi +echo -n "Can decompile DSDT: " +if [ -x /usr/bin/iasl -a -n "$DSDTPASS" ]; then + cp /sys/firmware/acpi/tables/DSDT /tmp/ + ERROR=`/usr/bin/iasl -d /tmp/DSDT 2>&1 | grep DSDT.dsl` + if [ -n "$ERROR" ]; then + lava-test-case can-decompile-DSDT --result pass + else + lava-test-case can-decompile-DSDT --result fail + fi + rm /tmp/DSDT /tmp/DSDT.dsl +else + lava-test-case can-decompile-DSDT --result skip +fi diff --git a/openembedded/sdkhelloc.yaml b/openembedded/sdkhelloc.yaml index 3a96fe8..059d599 100644 --- a/openembedded/sdkhelloc.yaml +++ b/openembedded/sdkhelloc.yaml @@ -14,13 +14,9 @@ metadata: - rtsm_fvp_base_cortex-a57x4-a53x4 - rtsm_fvp_base_cortex-a57x1-a53x1 -install: - git-repos: - - git://git.linaro.org/qa/test-definitions.git - run: steps: - - "cd test-definitions/openembedded/scripts" + - "cd openembedded/scripts" - "./sdkhelloc.sh" parse: diff --git a/openembedded/sdkhellocxx.yaml b/openembedded/sdkhellocxx.yaml index 61c00ce..11c9206 100644 --- a/openembedded/sdkhellocxx.yaml +++ b/openembedded/sdkhellocxx.yaml @@ -14,13 +14,9 @@ metadata: - rtsm_fvp_base_cortex-a57x4-a53x4 - rtsm_fvp_base_cortex-a57x1-a53x1 -install: - git-repos: - - git://git.linaro.org/qa/test-definitions.git - run: steps: - - "cd test-definitions/openembedded/scripts" + - "cd openembedded/scripts" - "./sdkhellocxx.sh" parse: diff --git a/openembedded/smoke-tests-basic.yaml b/openembedded/smoke-tests-basic.yaml new file mode 100644 index 0000000..00a4c6f --- /dev/null +++ b/openembedded/smoke-tests-basic.yaml @@ -0,0 +1,22 @@ +metadata: + format: Lava-Test Test Definition 1.0 + name: smoke-tests-basic + description: "Basic system test command for Linaro OpenEmbedded images" + maintainer: + - dave.pigott@linaro.org + os: + - openembedded + scope: + - functional + devices: + - vexpress-tc2 + +run: + steps: + - lava-test-case linux-linaro-openembedded-pwd --shell pwd + - lava-test-case linux-linaro-openembedded-uname --shell uname -a + - lava-test-case linux-linaro-openembedded-vmstat --shell vmstat + - lava-test-case linux-linaro-openembedded-ifconfig --shell ifconfig -a + - lava-test-case linux-linaro-openembedded-lscpu --shell lscpu + - lava-test-case linux-linaro-openembedded-lsusb --shell lsusb + - lava-test-case linux-linaro-openembedded-lsb_release --shell lsb_release -a diff --git a/openembedded/toolchain.yaml b/openembedded/toolchain.yaml index 7b3c97c..a68c7ad 100644 --- a/openembedded/toolchain.yaml +++ b/openembedded/toolchain.yaml @@ -11,13 +11,9 @@ metadata: devices: - rtsm_ve-armv8 -install: - git-repos: - - git://git.linaro.org/qa/test-definitions.git - run: steps: - - "cd test-definitions/openembedded/scripts" + - "cd openembedded/scripts" - "./toolchain.sh" parse: diff --git a/ubuntu/aapits.yaml b/ubuntu/aapits.yaml index c4a0b88..fc8dc1c 100644 --- a/ubuntu/aapits.yaml +++ b/ubuntu/aapits.yaml @@ -2,6 +2,8 @@ metadata: name: aapits format: "Lava-Test-Shell Test Definition 1.0" description: "Run ACPI API test suite" + maintainer: + - tomasz.nowicki@linaro.org os: - ubuntu devices: @@ -11,7 +13,7 @@ metadata: install: git-repos: - - git://git.linaro.org/people/ahs3/acpica.git + - git://git.linaro.org/people/al.stone/acpica.git steps: - 'cd acpica' - 'git branch linaro origin/linaro' diff --git a/ubuntu/acpi-abat.yaml b/ubuntu/acpi-abat.yaml deleted file mode 100644 index 2181785..0000000 --- a/ubuntu/acpi-abat.yaml +++ /dev/null @@ -1,30 +0,0 @@ -metadata: - name: abat - format: "Lava-Test-Shell Test Definition 1.0" - description: "Test Automated Basic Acceptance Tests (ABAT)" - os: - - ubuntu - devices: - - highbank - scope: - - functional - maintainer: - - naresh.bhat@linaro.org -install: - steps: - - 'apt-get install --yes wget' - - 'wget http://people.linaro.org/~naresh.bhat/acpi_abat_0.2.tar.gz' - - 'tar -zxvf acpi_abat_0.2.tar.gz' - - 'cd acpi_abat_0.2 && make all' - deps: - - build-essential -run: - steps: - - 'cd acpi_abat_0.2' - - './runall' - -parse: - pattern: "(?P<test_case_id>.*-*)\\s+:\\s+(?P<result>(PASS|FAIL))" - fixupdict: - PASS: pass - FAIL: fail diff --git a/ubuntu/acpica-tools.yaml b/ubuntu/acpica-tools.yaml new file mode 100644 index 0000000..934e0ac --- /dev/null +++ b/ubuntu/acpica-tools.yaml @@ -0,0 +1,39 @@ +metadata: + name: acpica + format: "Lava-Test-Shell Test Definition 1.0" + description: "Test ACPICA ASL" + maintainer: + - naresh.bhat@linaro.org + os: + - ubuntu + devices: + - highbank + scope: + - functional + +install: + git-repos: + - git://git.linaro.org/people/al.stone/acpica-tools.git + steps: + - 'cd acpica-tools' + deps: + - git + - git-core + - bzip2 + - flex + - bison + - build-essential +run: + steps: + - 'cd acpica-tools/tests/' + - 'sudo ./aslts.sh' + +parse: + pattern: "^(?P<test_case_id>\\S+)\\s+\\d+\\s+(?P<result>\\w+)\\s+:\\s+.+" + fixupdict: + TBROK: fail + TCONF: skip + TFAIL: fail + TINFO: unknown + TPASS: pass + TWARN: unknown diff --git a/ubuntu/acpica.yaml b/ubuntu/acpica.yaml index cb98abf..41728b9 100644 --- a/ubuntu/acpica.yaml +++ b/ubuntu/acpica.yaml @@ -2,6 +2,8 @@ metadata: name: acpica format: "Lava-Test-Shell Test Definition 1.0" description: "Test ACPICA" + maintainer: + - naresh.bhat@linaro.org os: - ubuntu devices: @@ -11,7 +13,7 @@ metadata: install: git-repos: - - git://git.linaro.org/people/ahs3/acpica.git + - git://git.linaro.org/people/al.stone/acpica.git steps: - 'cd acpica' - 'git branch linaro origin/linaro' diff --git a/ubuntu/bluetooth-enablement.yaml b/ubuntu/bluetooth-enablement.yaml index 45f069c..70f32c2 100644 --- a/ubuntu/bluetooth-enablement.yaml +++ b/ubuntu/bluetooth-enablement.yaml @@ -11,8 +11,6 @@ metadata: install: deps: - bluez - git-repos: - - http://git.linaro.org/git-ro/qa/test-definitions.git run: steps: diff --git a/ubuntu/bootchart.yaml b/ubuntu/bootchart.yaml index 08358a3..52268d0 100644 --- a/ubuntu/bootchart.yaml +++ b/ubuntu/bootchart.yaml @@ -23,12 +23,10 @@ install: - bootchart - lsb-release - pybootchartgui - git-repos: - - http://git.linaro.org/git-ro/qa/test-definitions.git run: steps: - - cd test-definitions/ubuntu/scripts + - cd ubuntu/scripts - lava-test-case bootchartscript --shell ./bootchartscript.sh - lava-test-case-attach bootchartscript bootchart.log text/plain - BOOTTIME=`cat bootchart.log | grep time | awk '{print $2}'` diff --git a/ubuntu/device-tree.yaml b/ubuntu/device-tree.yaml index f9d19ef..7442655 100644 --- a/ubuntu/device-tree.yaml +++ b/ubuntu/device-tree.yaml @@ -20,10 +20,6 @@ metadata: environment: - lava-test-shell -install: - git-repos: - - http://git.linaro.org/git-ro/qa/test-definitions.git - run: steps: - "cd ubuntu/scripts; sudo bash -x ./device-tree.sh" diff --git a/ubuntu/exec-latency.yaml b/ubuntu/exec-latency.yaml new file mode 100644 index 0000000..1d76a98 --- /dev/null +++ b/ubuntu/exec-latency.yaml @@ -0,0 +1,29 @@ +metadata: + name: exec-latency + version: "1.0" + format: "Lava-Test-Shell Test Definition 1.0" + description: "Run latency test" + maintainer: + - mike.holmes@linaro.org + os: + - ubuntu + devices: + - arndale + environment: + - lava-test-shell +install: + git-repos: + - 'git://git.linaro.org/people/mike.holmes/exec_latency.git' + steps: + - 'cd exec_latency' + - 'make' + deps: + - 'build-essential' +run: + steps: + - 'cd exec_latency' + - 'chmod +x exec_latency' + - './exec_latency' +parse: + pattern: "^(?P<test_case_id>\\S+)\\s+Measurement:(?P<measurement>\\d+\\.\\d+)\\s+Units:(?P<units>\\S+)\\s+Result:(?P<result>\\S+)" + diff --git a/ubuntu/fwts.yaml b/ubuntu/fwts.yaml index dafecac..bde69a5 100644 --- a/ubuntu/fwts.yaml +++ b/ubuntu/fwts.yaml @@ -2,6 +2,8 @@ metadata: name: fwts format: "Lava-Test-Shell Test Definition 1.0" description: "Run Firmware Test Suite (fwts)" + maintainer: + - naresh.bhat@linaro.org os: - ubuntu scope: diff --git a/ubuntu/gator-data-streaming-ubuntu.yaml b/ubuntu/gator-data-streaming-ubuntu.yaml new file mode 100644 index 0000000..85c3346 --- /dev/null +++ b/ubuntu/gator-data-streaming-ubuntu.yaml @@ -0,0 +1,26 @@ +metadata: + name: gator-data-streaming-ubuntu + format: "Lava-Test-Shell Test Definition 1.0" + description: "Gator Data Streaming Test for ubuntu." + maintainer: + - botao.sun@linaro.org + os: + - ubuntu + scope: + - functional + devices: + - arndale + - panda + - panda-es + - vexpress-a9 + - vexpress-tc2 + +run: + steps: + - "cd ubuntu/scripts; ./gator-data-streaming-ubuntu.sh" + +parse: + pattern: "(?P<test_case_id>[a-zA-Z0-9_-]+):\\s(?P<result>\\w+)" + fixupdict: + FAIL: fail + PASS: pass diff --git a/ubuntu/kvm.yaml b/ubuntu/kvm.yaml index 1e44ab4..337492a 100644 --- a/ubuntu/kvm.yaml +++ b/ubuntu/kvm.yaml @@ -17,15 +17,23 @@ install: deps: - qemu-system - qemu-utils - - rt-tests + - python-numpy - uml-utilities - bridge-utils - udhcpc + - wget + steps: + - 'wget http://people.redhat.com/mingo/cfs-scheduler/tools/hackbench.c' + - 'gcc -g -Wall -O2 -o hackbench hackbench.c -lpthread' + - 'cp hackbench /usr/bin/' + run: steps: - 'sudo ./common/scripts/kvm/test-host.sh' - 'sudo ./common/scripts/kvm/test-kvm.sh' - - "lava-test-run-attach kvm-log.txt text/plain" + - 'sudo ./common/scripts/kvm/test-rt-parse.sh' + - 'lava-test-run-attach kvm-log.txt text/plain' + - 'lava-test-run-attach guest.log text/plain' parse: - pattern: "(?P<test_case_id>.*-*):\\s+(?P<result>(pass|fail))" + pattern: '^(?P<test_case_id>[^:]+):\s*(?P<measurement>[0-9.]+)\s+(?P<units>\w+)\s+(?P<result>\w+)' diff --git a/ubuntu/leb-basic-graphics.yaml b/ubuntu/leb-basic-graphics.yaml index 72b9c00..8c012ba 100644 --- a/ubuntu/leb-basic-graphics.yaml +++ b/ubuntu/leb-basic-graphics.yaml @@ -4,8 +4,6 @@ metadata: description: "Test Linaro engineering builds basic graphics" install: - git-repos: - - http://git.linaro.org/git-ro/qa/test-definitions.git deps: - mesa-utils-extra - ubuntu-desktop diff --git a/ubuntu/netperf-client-multinode.yaml b/ubuntu/netperf-client-multinode.yaml index 49e2175..626822a 100644 --- a/ubuntu/netperf-client-multinode.yaml +++ b/ubuntu/netperf-client-multinode.yaml @@ -23,13 +23,15 @@ install: deps: - netperf - python-minimal +params: + ETH: eth0 run: steps: - ifconfig -a - route - - lava-network broadcast eth0 - - lava-network collect eth0 + - lava-network broadcast $ETH + - lava-network collect $ETH - lava-sync ready - lava-test-case multinode-lava-network --shell ./common/scripts/netperf-client.sh - lava-sync done diff --git a/ubuntu/netperf-server-multinode.yaml b/ubuntu/netperf-server-multinode.yaml index d7d5b37..1a74940 100644 --- a/ubuntu/netperf-server-multinode.yaml +++ b/ubuntu/netperf-server-multinode.yaml @@ -23,13 +23,15 @@ install: deps: - netperf - python-minimal +params: + ETH: eth0 run: steps: - ifconfig -a - route - - lava-network broadcast eth0 - - lava-network collect eth0 + - lava-network broadcast $ETH + - lava-network collect $ETH - lava-test-case multinode-lava-network --shell ./common/scripts/netperf-server.sh - lava-sync ready - lava-sync done diff --git a/ubuntu/perf.yaml b/ubuntu/perf.yaml index cc87e1c..600efbe 100644 --- a/ubuntu/perf.yaml +++ b/ubuntu/perf.yaml @@ -15,8 +15,6 @@ metadata: - highbank install: - git-repos: - - http://git.linaro.org/git-ro/qa/test-definitions.git deps: - linux-tools - stress-dbgsym diff --git a/ubuntu/scripts/gator-data-streaming-ubuntu.sh b/ubuntu/scripts/gator-data-streaming-ubuntu.sh new file mode 100755 index 0000000..b976596 --- /dev/null +++ b/ubuntu/scripts/gator-data-streaming-ubuntu.sh @@ -0,0 +1,89 @@ +#!/bin/bash +# +# Gator data streaming test for ubuntu +# +# Copyright (C) 2013, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Author: Botao Sun <botao.sun@linaro.org> + +source include/sh-test-lib + +# Location of XML template and data streaming result folder +xml_template="/root/session.xml" +data_streaming_result="/root/linaro-ubuntu-gator-data-streaming.apc" + +# Create sample XML file as a template +echo -ne "<?xml version="1.0" encoding="US-ASCII" ?> \n<session version="1" output_path="x" call_stack_unwinding="yes" parse_debug_info="yes" \nhigh_resolution="no" buffer_mode="streaming" sample_rate="normal" duration="10" \ntarget_host="linaro-ubuntu-boards" target_port="8080"> \n</session> \n" > $xml_template + +## Test case definitions +# Check whether session.xml is available +test_session_xml_not_empty() { + TEST="session_xml_not_empty" + + if [ ! -f $xml_template ]; then + fail_test "Unable to find $xml_template" + return 1 + fi + + session_file=`cat $xml_template` + if [ -z "$session_file" ]; then + fail_test "Empty template session XML file at $xml_template" + return 1 + fi + + pass_test +} + +# Check the gator data streaming command +test_gator_data_streaming_cmd() { + TEST="gator_data_streaming_cmd" + /usr/sbin/gatord -s $xml_template -o $data_streaming_result + if [ $? -ne 0 ]; then + fail_test "Run gator data streaming command failed" + return 1 + fi + + pass_test +} + +# Check whether data streaming result is available +test_gator_data_streaming_result() { + TEST="gator_data_streaming_result" + if [ ! -d $data_streaming_result ]; then + fail_test "Gator data streaming result folder doesn't exist" + return 1 + elif [ ! -f $data_streaming_result/captured.xml ]; then + fail_test "File captured.xml doesn't exist" + return 1 + elif [ ! -s $data_streaming_result/captured.xml ]; then + fail_test "File captured.xml is empty" + return 1 + fi + + # Print some necessary directory structure information + ls -la $data_streaming_result + + pass_test +} + +# run the tests +test_session_xml_not_empty +test_gator_data_streaming_cmd +test_gator_data_streaming_result + +# clean exit so lava-test can trust the results +exit 0
\ No newline at end of file diff --git a/ubuntu/scripts/sd-mmc-ubuntu.sh b/ubuntu/scripts/sd-mmc-ubuntu.sh new file mode 100755 index 0000000..525e49d --- /dev/null +++ b/ubuntu/scripts/sd-mmc-ubuntu.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# +# SD MMC test for ubuntu +# +# Copyright (C) 2013, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Author: Botao Sun <botao.sun@linaro.org> + +source include/sh-test-lib + +keyword="I/O error" + +## Test case definitions +# Check the existence of SD card in system +test_sd_existence() { + TEST="sd_existence" + + dmesg | grep "SD" + if [ $? -ne 0 ]; then + fail_test "SD card doesn't exist in system" + return 1 + fi + + pass_test +} + +# Check whether I/O errors show up in dmesg output +test_sd_mmc_IO_errors() { + TEST="sd_mmc_IO_errors" + + dmesg | grep "$keyword" + if [ $? -eq 0 ]; then + fail_test "I/O error found, SD MMC test failed" + return 1 + fi + + pass_test +} + +# run the tests +test_sd_existence +test_sd_mmc_IO_errors + +# clean exit so lava-test can trust the results +exit 0
\ No newline at end of file diff --git a/ubuntu/scripts/wifi-ubuntu.sh b/ubuntu/scripts/wifi-ubuntu.sh new file mode 100755 index 0000000..5b2d39c --- /dev/null +++ b/ubuntu/scripts/wifi-ubuntu.sh @@ -0,0 +1,107 @@ +#!/bin/bash +# +# WiFi test cases for Linaro ubuntu +# +# Copyright (C) 2013, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Author: Botao Sun <botao.sun@linaro.org> + +source include/sh-test-lib + +## Test case definitions +# Check if wifi interface exists or not +test_has_interface() { + TEST="has_interface" + + echo "###########################################" + ifconfig -a + echo "###########################################" + + wifi_interface=`ifconfig -a | grep wlan0` + echo "The WiFi Interface Name is $wifi_interface" + + if [ -z "$wifi_interface" ]; then + fail_test "The WiFi interface doesn't exist, WiFi enable failed" + return 1 + fi + + pass_test +} + +# Check if the wireless access point can be connected or not +test_connect_to_ap() { + TEST="connect_to_ap" + + network_config_file="/etc/network/interfaces" + echo $network_config_file + + # Turn off Ethernet + mv $network_config_file $network_config_file".bak" + echo -ne "auto wlan0\niface wlan0 inet dhcp\nwpa-ssid $1\nwpa-psk $2" > $network_config_file + + service networking restart + + echo "###########################################" + ifconfig wlan0 + echo "###########################################" + + # Get ip address from WiFi interface + ip_address_line=`ifconfig wlan0 | grep "inet addr"` + echo $ip_address_line + + ip_address_array=($ip_address_line) + ip_address_element=${ip_address_array[1]} + echo $ip_address_element + + ip_address=${ip_address_element:5} + echo $ip_address + + # Ping test here + ping -c 5 -I ${ip_address} www.google.com + if [ $? -ne 0 ]; then + fail_test "Ping test failed from $ip_address" + return 1 + fi + + # Packet loss report + packet_loss_line=`ping -c 5 -I ${ip_address} www.google.com | grep "packet loss"` + echo $packet_loss_line + + packet_loss_array=($packet_loss_line) + packet_loss=${packet_loss_array[5]} + echo "The packet loss rate is $packet_loss" + + if [ "$packet_loss" != "0%" ]; then + fail_test "Packet loss happened, rate is $packet_loss" + return 1 + fi + + # Restore the environment + rm -rf $network_config_file + mv $network_config_file".bak" $network_config_file + + service networking restart + sleep 30 + + pass_test +} + +# run the tests +test_has_interface +test_connect_to_ap $1 $2 +# clean exit so lava-test can trust the results +exit 0
\ No newline at end of file diff --git a/ubuntu/sd-mmc-ubuntu.yaml b/ubuntu/sd-mmc-ubuntu.yaml new file mode 100644 index 0000000..40ef756 --- /dev/null +++ b/ubuntu/sd-mmc-ubuntu.yaml @@ -0,0 +1,26 @@ +metadata: + name: sd-mmc-ubuntu + format: "Lava-Test-Shell Test Definition 1.0" + description: "Test SD MMC on Linux Linaro ubuntu" + maintainer: + - botao.sun@linaro.org + os: + - ubuntu + devices: + - panda + - panda-es + - vexpress-a9 + - vexpress-tc2 + - arndale + environment: + - lava-test-shell + +run: + steps: + - "cd ubuntu/scripts; ./sd-mmc-ubuntu.sh" + +parse: + pattern: "(?P<test_case_id>[a-zA-Z0-9_-]+):\\s(?P<result>\\w+)" + fixupdict: + FAIL: fail + PASS: pass diff --git a/ubuntu/wifi-enablement.yaml b/ubuntu/wifi-enablement.yaml index 5f2172e..2f39763 100644 --- a/ubuntu/wifi-enablement.yaml +++ b/ubuntu/wifi-enablement.yaml @@ -8,8 +8,6 @@ metadata: - functional install: - git-repos: - - http://git.linaro.org/git-ro/qa/test-definitions.git deps: - wpasupplicant - isc-dhcp-client diff --git a/ubuntu/wifi-ubuntu.yaml b/ubuntu/wifi-ubuntu.yaml new file mode 100644 index 0000000..60c7bee --- /dev/null +++ b/ubuntu/wifi-ubuntu.yaml @@ -0,0 +1,24 @@ +metadata: + name: wifi-ubuntu + format: "Lava-Test-Shell Test Definition 1.0" + description: "Test WiFi on Linux Linaro ubuntu. SSID and PASSWORD are possible to be set in JSON." + maintainer: + - botao.sun@linaro.org + os: + - ubuntu + devices: + - panda-es + environment: + - lava-test-shell +params: + SSID: LAVA-WiFi-G + PASSWORD: DoubleSuezBun +run: + steps: + - "cd ubuntu/scripts; ./wifi-ubuntu.sh $SSID $PASSWORD" + +parse: + pattern: "(?P<test_case_id>[a-zA-Z0-9_-]+):\\s(?P<result>\\w+)" + fixupdict: + FAIL: fail + PASS: pass
\ No newline at end of file |