From patchwork Tue Apr 9 13:50:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sanjay Singh Rawat X-Patchwork-Id: 15997 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-gg0-f198.google.com (mail-gg0-f198.google.com [209.85.161.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6FE07277CA for ; Tue, 9 Apr 2013 13:50:55 +0000 (UTC) Received: by mail-gg0-f198.google.com with SMTP id a5sf9336977ggn.5 for ; Tue, 09 Apr 2013 06:50:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=UjWvOlCvKf/Un3waUL/BhnmngS4kI/O5nW9Gws/49lg=; b=kHdijvkQehhWwTdXz1PFywYIh5jkrcJvBGk8pc/dAmnORMVv3nl3/ciBXin0xEPO4O FsyKM0EOW3lFckpsAZDNyxSmrmIB0ChzuRLBniA5aIwFZQHnluNSFftzMnTLGJpgL2FB 3Du3tJVuOJ5rbgdVfiNdJA6a5rfj4ScVE5rQ49UEqoJhWScvhs5XlTAh5OpziTtANMLx +hsutqOlZZadEGQrLJOwIyG27t8SNscebdBE5vjI6y2U9Hm6GVK6us8LzgKtj/oF0xwY il6P6hhfNMbuAEV8zHwIFjAwR5nGfrAZMnlrJlbBkMdFCVwt6SqGxV7ZSYxJv75ZNKer 0uBw== X-Received: by 10.224.72.199 with SMTP id n7mr8235583qaj.5.1365515438434; Tue, 09 Apr 2013 06:50:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.109.105 with SMTP id hr9ls2165103qeb.6.gmail; Tue, 09 Apr 2013 06:50:38 -0700 (PDT) X-Received: by 10.52.176.38 with SMTP id cf6mr7562909vdc.132.1365515438153; Tue, 09 Apr 2013 06:50:38 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id b3si21539292vea.24.2013.04.09.06.50.37 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Apr 2013 06:50:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id ha12so207219vcb.34 for ; Tue, 09 Apr 2013 06:50:37 -0700 (PDT) X-Received: by 10.58.206.102 with SMTP id ln6mr15965974vec.37.1365515437809; Tue, 09 Apr 2013 06:50:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.85.136 with SMTP id h8csp62602vez; Tue, 9 Apr 2013 06:50:37 -0700 (PDT) X-Received: by 10.66.216.198 with SMTP id os6mr43976563pac.145.1365515436459; Tue, 09 Apr 2013 06:50:36 -0700 (PDT) Received: from mail-pb0-f49.google.com (mail-pb0-f49.google.com [209.85.160.49]) by mx.google.com with ESMTPS id fd8si34591777pad.133.2013.04.09.06.50.36 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Apr 2013 06:50:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.49 is neither permitted nor denied by best guess record for domain of sanjay.rawat@linaro.org) client-ip=209.85.160.49; Received: by mail-pb0-f49.google.com with SMTP id um15so250813pbc.22 for ; Tue, 09 Apr 2013 06:50:36 -0700 (PDT) X-Received: by 10.68.216.9 with SMTP id om9mr2498354pbc.145.1365515436015; Tue, 09 Apr 2013 06:50:36 -0700 (PDT) Received: from localhost.localdomain ([223.239.143.234]) by mx.google.com with ESMTPS id cp1sm2299651pbc.42.2013.04.09.06.50.33 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Apr 2013 06:50:35 -0700 (PDT) From: Sanjay Singh Rawat To: linaro-dev@lists.linaro.org Cc: patches@linaro.org, Sanjay Singh Rawat Subject: [PATCH pmqa] pm-qa: show proper result status for tests Date: Tue, 9 Apr 2013 19:20:37 +0530 Message-Id: <1365515437-3050-1-git-send-email-sanjay.rawat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQlTLSlHTLYLAFoHbW4f3KThvgUSj8uwuG7L2kp/dmAweIZMFHm6WB6KHaq3hJ/h2t4tYb+J X-Original-Sender: sanjay.rawat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Change the result message for each subtest. Report total pass and fail count for subtests. O/P logs: cpufreq_06.5/cpu3: checking deviation for frequency 2.0 GHz... Ok cpufreq_06.6/cpu3: checking deviation for frequency 1.8 GHz... Ok cpufreq_06.7/cpu3: checking deviation for frequency 1.6 GHz... Ok cpufreq_06.8/cpu3: checking deviation for frequency 1.4 GHz... Ok cpufreq_06.9/cpu3: checking deviation for frequency 1.2 GHz... Ok cpufreq_06.10/cpu3: checking deviation for frequency 1000.0 MHz... Err cpufreq_06.11/cpu3: checking deviation for frequency 800.0 MHz... Err -------- total = 48 -------- pass = 36 -------- fail = 12 Signed-off-by: Sanjay Singh Rawat --- cpufreq/cpufreq_01.sh | 1 + cpufreq/cpufreq_02.sh | 1 + cpufreq/cpufreq_03.sh | 1 + cpufreq/cpufreq_04.sh | 1 + cpufreq/cpufreq_05.sh | 1 + cpufreq/cpufreq_06.sh | 1 + cpufreq/cpufreq_07.sh | 1 + cpufreq/cpufreq_08.sh | 1 + cpufreq/cpufreq_09.sh | 1 + cpuhotplug/1_sanity_check.sh | 1 + cpuhotplug/cpuhotplug_01.sh | 1 + cpuhotplug/cpuhotplug_02.sh | 1 + cpuhotplug/cpuhotplug_03.sh | 3 ++- cpuhotplug/cpuhotplug_04.sh | 1 + cpuhotplug/cpuhotplug_05.sh | 1 + cpuhotplug/cpuhotplug_06.sh | 1 + cpuhotplug/cpuhotplug_07.sh | 1 + cpuhotplug/cpuhotplug_08.sh | 1 + cpuhotplug/z_sanity_check.sh | 1 + cpuidle/cpuidle_01.sh | 1 + cpuidle/cpuidle_02.sh | 1 + cpuidle/cpuidle_03.sh | 1 + cpuidle/cpuidle_sanity.sh | 1 + include/functions.sh | 17 +++++++++++++++-- powertop/powertop_01.sh | 1 + powertop/powertop_sanity.sh | 1 + suspend/suspend_01.sh | 1 + suspend/suspend_02.sh | 1 + suspend/suspend_03.sh | 1 + suspend/suspend_04.sh | 1 + suspend/suspend_05.sh | 1 + thermal/thermal_01.sh | 1 + thermal/thermal_02.sh | 1 + thermal/thermal_03.sh | 1 + thermal/thermal_04.sh | 1 + thermal/thermal_05.sh | 1 + thermal/thermal_06.sh | 1 + thermal/thermal_sanity.sh | 1 + 38 files changed, 53 insertions(+), 3 deletions(-) diff --git a/cpufreq/cpufreq_01.sh b/cpufreq/cpufreq_01.sh index f4fc178..dd93c29 100755 --- a/cpufreq/cpufreq_01.sh +++ b/cpufreq/cpufreq_01.sh @@ -30,3 +30,4 @@ source ../include/functions.sh FILES="scaling_available_frequencies scaling_cur_freq scaling_setspeed" for_each_cpu check_cpufreq_files $FILES +test_status_show diff --git a/cpufreq/cpufreq_02.sh b/cpufreq/cpufreq_02.sh index aeecd45..1ec725f 100755 --- a/cpufreq/cpufreq_02.sh +++ b/cpufreq/cpufreq_02.sh @@ -30,3 +30,4 @@ source ../include/functions.sh FILES="scaling_available_governors scaling_governor" for_each_cpu check_cpufreq_files $FILES +test_status_show diff --git a/cpufreq/cpufreq_03.sh b/cpufreq/cpufreq_03.sh index 65aed52..ae32fee 100755 --- a/cpufreq/cpufreq_03.sh +++ b/cpufreq/cpufreq_03.sh @@ -49,3 +49,4 @@ if [ $(id -u) != 0 ]; then fi for_each_cpu for_each_governor check_governor || exit 1 +test_status_show diff --git a/cpufreq/cpufreq_04.sh b/cpufreq/cpufreq_04.sh index f044164..3edf83f 100755 --- a/cpufreq/cpufreq_04.sh +++ b/cpufreq/cpufreq_04.sh @@ -57,3 +57,4 @@ if [ -z "$supported" ]; then else for_each_cpu for_each_frequency check_frequency || exit 1 fi +test_status_show diff --git a/cpufreq/cpufreq_05.sh b/cpufreq/cpufreq_05.sh index f4cc997..a0b82f4 100755 --- a/cpufreq/cpufreq_05.sh +++ b/cpufreq/cpufreq_05.sh @@ -98,3 +98,4 @@ if [ $nrcpus > 1 ]; then fi restore_governors +test_status_show diff --git a/cpufreq/cpufreq_06.sh b/cpufreq/cpufreq_06.sh index cb45e4b..08f7a6d 100755 --- a/cpufreq/cpufreq_06.sh +++ b/cpufreq/cpufreq_06.sh @@ -121,3 +121,4 @@ for_each_cpu check_deviation restore_frequencies restore_governors +test_status_show diff --git a/cpufreq/cpufreq_07.sh b/cpufreq/cpufreq_07.sh index 354ed46..516e0a7 100755 --- a/cpufreq/cpufreq_07.sh +++ b/cpufreq/cpufreq_07.sh @@ -95,3 +95,4 @@ trap "restore_governors; sigtrap" SIGHUP SIGINT SIGTERM for_each_cpu check_ondemand restore_governors +test_status_show diff --git a/cpufreq/cpufreq_08.sh b/cpufreq/cpufreq_08.sh index 328b4f5..d78c191 100755 --- a/cpufreq/cpufreq_08.sh +++ b/cpufreq/cpufreq_08.sh @@ -82,3 +82,4 @@ trap "restore_governors; sigtrap" SIGHUP SIGINT SIGTERM for_each_cpu check_userspace restore_governors +test_status_show diff --git a/cpufreq/cpufreq_09.sh b/cpufreq/cpufreq_09.sh index c1d1a7b..3ffccec 100755 --- a/cpufreq/cpufreq_09.sh +++ b/cpufreq/cpufreq_09.sh @@ -78,3 +78,4 @@ trap "restore_governors; sigtrap" SIGHUP SIGINT SIGTERM for_each_cpu check_powersave restore_governors +test_status_show diff --git a/cpuhotplug/1_sanity_check.sh b/cpuhotplug/1_sanity_check.sh index 50ebbcc..e091879 100755 --- a/cpuhotplug/1_sanity_check.sh +++ b/cpuhotplug/1_sanity_check.sh @@ -37,3 +37,4 @@ sanity_check() { } check "all cpu are online" "sanity_check" +test_status_show diff --git a/cpuhotplug/cpuhotplug_01.sh b/cpuhotplug/cpuhotplug_01.sh index 83fc17a..a1dfe93 100755 --- a/cpuhotplug/cpuhotplug_01.sh +++ b/cpuhotplug/cpuhotplug_01.sh @@ -34,3 +34,4 @@ for i in $FILES; do done for_each_cpu check_cpuhotplug_files online +test_status_show diff --git a/cpuhotplug/cpuhotplug_02.sh b/cpuhotplug/cpuhotplug_02.sh index 4273f65..2c582cf 100755 --- a/cpuhotplug/cpuhotplug_02.sh +++ b/cpuhotplug/cpuhotplug_02.sh @@ -58,3 +58,4 @@ check_state() { } for_each_cpu check_state +test_status_show diff --git a/cpuhotplug/cpuhotplug_03.sh b/cpuhotplug/cpuhotplug_03.sh index 51cde18..d4816ca 100755 --- a/cpuhotplug/cpuhotplug_03.sh +++ b/cpuhotplug/cpuhotplug_03.sh @@ -48,4 +48,5 @@ check_affinity_fails() { return 0 } -for_each_cpu check_affinity_fails \ No newline at end of file +for_each_cpu check_affinity_fails +test_status_show diff --git a/cpuhotplug/cpuhotplug_04.sh b/cpuhotplug/cpuhotplug_04.sh index 753cf55..67098e1 100755 --- a/cpuhotplug/cpuhotplug_04.sh +++ b/cpuhotplug/cpuhotplug_04.sh @@ -69,3 +69,4 @@ check_task_migrate() { } for_each_cpu check_task_migrate +test_status_show diff --git a/cpuhotplug/cpuhotplug_05.sh b/cpuhotplug/cpuhotplug_05.sh index 12df3c4..98371d4 100755 --- a/cpuhotplug/cpuhotplug_05.sh +++ b/cpuhotplug/cpuhotplug_05.sh @@ -47,3 +47,4 @@ check_procinfo() { } for_each_cpu check_procinfo +test_status_show diff --git a/cpuhotplug/cpuhotplug_06.sh b/cpuhotplug/cpuhotplug_06.sh index ce4ffeb..1f2641d 100755 --- a/cpuhotplug/cpuhotplug_06.sh +++ b/cpuhotplug/cpuhotplug_06.sh @@ -47,3 +47,4 @@ check_procinfo() { } for_each_cpu check_procinfo +test_status_show diff --git a/cpuhotplug/cpuhotplug_07.sh b/cpuhotplug/cpuhotplug_07.sh index 72d9744..6486dd7 100755 --- a/cpuhotplug/cpuhotplug_07.sh +++ b/cpuhotplug/cpuhotplug_07.sh @@ -64,3 +64,4 @@ check_notification() { } for_each_cpu check_notification +test_status_show diff --git a/cpuhotplug/cpuhotplug_08.sh b/cpuhotplug/cpuhotplug_08.sh index e996f11..d413595 100755 --- a/cpuhotplug/cpuhotplug_08.sh +++ b/cpuhotplug/cpuhotplug_08.sh @@ -47,3 +47,4 @@ random_stress() { } for i in $(seq 1 50); do random_stress || break; done +test_status_show diff --git a/cpuhotplug/z_sanity_check.sh b/cpuhotplug/z_sanity_check.sh index 43051ac..c39413e 100755 --- a/cpuhotplug/z_sanity_check.sh +++ b/cpuhotplug/z_sanity_check.sh @@ -37,3 +37,4 @@ sanity_check() { } check "all cpu are back online" "sanity_check" +test_status_show diff --git a/cpuidle/cpuidle_01.sh b/cpuidle/cpuidle_01.sh index 8fe2f5d..ec7b911 100755 --- a/cpuidle/cpuidle_01.sh +++ b/cpuidle/cpuidle_01.sh @@ -58,3 +58,4 @@ check_cpuidle_files() { check_cpuidle_files for_each_cpu check_cpuidle_state_files +test_status_show diff --git a/cpuidle/cpuidle_02.sh b/cpuidle/cpuidle_02.sh index 1b155c1..491107b 100755 --- a/cpuidle/cpuidle_02.sh +++ b/cpuidle/cpuidle_02.sh @@ -35,3 +35,4 @@ if [ $(id -u) != 0 ]; then fi check "cpuidle program runs successfully (120 secs)" "./$CPUIDLE_KILLER" +test_status_show diff --git a/cpuidle/cpuidle_03.sh b/cpuidle/cpuidle_03.sh index 22bca10..25cca1b 100755 --- a/cpuidle/cpuidle_03.sh +++ b/cpuidle/cpuidle_03.sh @@ -58,3 +58,4 @@ trap "restore_cpus; sigtrap" SIGHUP SIGINT SIGTERM for_each_cpu check_cpuidle_kill restore_cpus +test_status_show diff --git a/cpuidle/cpuidle_sanity.sh b/cpuidle/cpuidle_sanity.sh index a8336fa..568c129 100755 --- a/cpuidle/cpuidle_sanity.sh +++ b/cpuidle/cpuidle_sanity.sh @@ -33,3 +33,4 @@ check_cpuidle_sysfs_entry() { } check_cpuidle_sysfs_entry +test_status_show diff --git a/include/functions.sh b/include/functions.sh index 7ee809b..fa9a370 100644 --- a/include/functions.sh +++ b/include/functions.sh @@ -30,6 +30,17 @@ TEST_NAME=$(basename ${0%.sh}) PREFIX=$TEST_NAME INC=0 CPU= +pass_count=0 +fail_count=0 + +test_status_show() { + echo "-------- total = $(($pass_count + $fail_count))" + echo "-------- pass = $pass_count" + # report failure only if it is there + if [ $fail_count -ne 0 ] ; then + echo "-------- fail = $fail_count" + fi +} log_begin() { printf "%-76s" "$TEST_NAME.$INC$CPU: $@... " @@ -216,11 +227,13 @@ check() { $func $@ if [ $? != 0 ]; then - log_end "fail" + log_end "Err" + fail_count=$(($fail_count + 1)) return 1 fi - log_end "pass" + log_end "Ok" + pass_count=$(($pass_count + 1)) return 0 } diff --git a/powertop/powertop_01.sh b/powertop/powertop_01.sh index cf243f1..c66b725 100755 --- a/powertop/powertop_01.sh +++ b/powertop/powertop_01.sh @@ -56,3 +56,4 @@ run_powertop() { } run_powertop +test_status_show diff --git a/powertop/powertop_sanity.sh b/powertop/powertop_sanity.sh index 3ae3065..060f85c 100755 --- a/powertop/powertop_sanity.sh +++ b/powertop/powertop_sanity.sh @@ -33,3 +33,4 @@ check_powertop() { } check_powertop +test_status_show diff --git a/suspend/suspend_01.sh b/suspend/suspend_01.sh index e591dc9..6f36302 100755 --- a/suspend/suspend_01.sh +++ b/suspend/suspend_01.sh @@ -45,4 +45,5 @@ else fi restore_trace +test_status_show rm -f "$LOGFILE" diff --git a/suspend/suspend_02.sh b/suspend/suspend_02.sh index 5e41d08..ceb6398 100755 --- a/suspend/suspend_02.sh +++ b/suspend/suspend_02.sh @@ -45,5 +45,6 @@ else fi restore_trace +test_status_show rm -f "$LOGFILE" diff --git a/suspend/suspend_03.sh b/suspend/suspend_03.sh index b71966c..de81627 100755 --- a/suspend/suspend_03.sh +++ b/suspend/suspend_03.sh @@ -46,4 +46,5 @@ else fi restore_trace +test_status_show rm -f "$LOGFILE" diff --git a/suspend/suspend_04.sh b/suspend/suspend_04.sh index 8947afd..0eb70dd 100755 --- a/suspend/suspend_04.sh +++ b/suspend/suspend_04.sh @@ -70,4 +70,5 @@ else fi restore_trace +test_status_show rm -f "$LOGFILE" diff --git a/suspend/suspend_05.sh b/suspend/suspend_05.sh index a87490c..55396e5 100755 --- a/suspend/suspend_05.sh +++ b/suspend/suspend_05.sh @@ -90,4 +90,5 @@ else fi restore_trace +test_status_show rm -f "$LOGFILE" diff --git a/thermal/thermal_01.sh b/thermal/thermal_01.sh index 390fbde..5a74296 100755 --- a/thermal/thermal_01.sh +++ b/thermal/thermal_01.sh @@ -83,3 +83,4 @@ for_each_thermal_zone check_thermal_zone_mode check_thermal_zone_trip_level check_thermal_zone_bindings +test_status_show diff --git a/thermal/thermal_02.sh b/thermal/thermal_02.sh index d2cb32e..a78618c 100755 --- a/thermal/thermal_02.sh +++ b/thermal/thermal_02.sh @@ -63,3 +63,4 @@ check_cooling_device_states() { for_each_cooling_device check_cooling_device_attributes for_each_cooling_device check_cooling_device_states +test_status_show diff --git a/thermal/thermal_03.sh b/thermal/thermal_03.sh index f2cfb81..92e9569 100755 --- a/thermal/thermal_03.sh +++ b/thermal/thermal_03.sh @@ -61,3 +61,4 @@ check_temperature_change() { trap "heater_kill; sigtrap" SIGHUP SIGINT SIGTERM for_each_thermal_zone check_temperature_change +test_status_show diff --git a/thermal/thermal_04.sh b/thermal/thermal_04.sh index 7fe53e2..58aac43 100755 --- a/thermal/thermal_04.sh +++ b/thermal/thermal_04.sh @@ -81,3 +81,4 @@ verify_cooling_device_temp_change() { trap "heater_kill; sigtrap" SIGHUP SIGINT SIGTERM for_each_cooling_device verify_cooling_device_temp_change +test_status_show diff --git a/thermal/thermal_05.sh b/thermal/thermal_05.sh index e7e2710..3dcaa8d 100755 --- a/thermal/thermal_05.sh +++ b/thermal/thermal_05.sh @@ -72,3 +72,4 @@ verify_cpufreq_cooling_device_action() { echo $prev_state_val > $dirpath/cur_state } for_each_cooling_device verify_cpufreq_cooling_device_action +test_status_show diff --git a/thermal/thermal_06.sh b/thermal/thermal_06.sh index b0a9442..e170028 100755 --- a/thermal/thermal_06.sh +++ b/thermal/thermal_06.sh @@ -103,3 +103,4 @@ check_trip_point_change() { trap "heater_kill; sigtrap" SIGHUP SIGINT SIGTERM for_each_thermal_zone check_trip_point_change +test_status_show diff --git a/thermal/thermal_sanity.sh b/thermal/thermal_sanity.sh index 7d4ca6c..37e4c88 100755 --- a/thermal/thermal_sanity.sh +++ b/thermal/thermal_sanity.sh @@ -31,3 +31,4 @@ check_thermal_zone() { } check_thermal_zone +test_status_show