From patchwork Thu May 10 14:16:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: rajagopal.venkat@linaro.org X-Patchwork-Id: 8521 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 770F923E9A for ; Thu, 10 May 2012 14:17:00 +0000 (UTC) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by fiordland.canonical.com (Postfix) with ESMTP id 5F982A18606 for ; Thu, 10 May 2012 14:17:00 +0000 (UTC) Received: by wibhm4 with SMTP id hm4so508077wib.17 for ; Thu, 10 May 2012 07:17:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=UJkaj1PHchQT2aFMWwXpSDhtUyPGmxXv2GjMInjKfKI=; b=BXFt9kA8h67Mf/bMyxQUQ0a39yrPjxaMMwacCTQoO2cnaAxEhbtvnVN8lcwlVuRsWb z/hkxcX8/3hDUM/dDFH8Td2YfS1imwiUKV0dtdalcpqyuIhzdMGNLMSXvaAWN2nFw5iL 4RSBVEnmqbLEWG7tDpjVsx6ofeI/pcdupD4d/mMF1+PFzUgeE5zye3ycrUc2T1MtVKF0 /AXAoZuupVdgQCwsLYBt9rH0gWryIF56XRi2JV/TtuITZoK3VYniPy+GgWs46ZO8OBWA HOZ401GFoaBzkUOgt4O6infvChRm6/xTbGe6D3iR+VvQ8F2g8aUVVanfLXhgHCq0lpAB VKdw== Received: by 10.50.57.129 with SMTP id i1mr2596651igq.33.1336659419621; Thu, 10 May 2012 07:16:59 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.73.147 with SMTP id q19csp99286ibj; Thu, 10 May 2012 07:16:58 -0700 (PDT) Received: by 10.68.194.170 with SMTP id hx10mr8779166pbc.119.1336659418457; Thu, 10 May 2012 07:16:58 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id rz2si10577237pbc.248.2012.05.10.07.16.58 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 May 2012 07:16:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of rajagopal.venkat@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of rajagopal.venkat@linaro.org) smtp.mail=rajagopal.venkat@linaro.org Received: by danh15 with SMTP id h15so2205967dan.37 for ; Thu, 10 May 2012 07:16:58 -0700 (PDT) Received: by 10.68.131.71 with SMTP id ok7mr3269408pbb.139.1336659418114; Thu, 10 May 2012 07:16:58 -0700 (PDT) Received: from localhost.localdomain ([101.63.167.26]) by mx.google.com with ESMTPS id o9sm9642127pbe.60.2012.05.10.07.16.54 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 May 2012 07:16:57 -0700 (PDT) From: rajagopal.venkat@linaro.org To: linaro-dev@lists.linaro.org Cc: patches@linaro.org, Rajagopal Venkat Subject: [PATCH] PM-QA: remove obsolete test scripts Date: Thu, 10 May 2012 19:46:43 +0530 Message-Id: <1336659403-3681-1-git-send-email-rajagopl.venkat@linaro.org> X-Mailer: git-send-email 1.7.1 X-Gm-Message-State: ALoCoQlua2Ckus88GuE9IHM7jXQX+Ynx8slfMYiDj9dJI110CMqkQ1UxtanZcbAdP8M4mJElAw62 From: Rajagopal Venkat The updated version of these test scripts are available in their respective directories. Signed-off-by: Rajagopal Venkat --- run_template | 7 -- testcases.awk | 40 ---------- testcases/Makefile | 39 ---------- testcases/cpufreq/Makefile | 31 -------- testcases/cpufreq/avail_freq01.sh | 56 -------------- testcases/cpufreq/avail_freq02.sh | 68 ---------------- testcases/cpufreq/avail_gov01.sh | 45 ----------- testcases/cpufreq/avail_gov02.sh | 48 ------------ testcases/cpuhotplug/Makefile | 32 -------- testcases/cpuhotplug/cpu_hotplug_latency.sh | 88 --------------------- testcases/cpuidle/Makefile | 34 -------- testcases/cpuidle/test_usb_cpuidle.c | 102 ------------------------- testcases/proof_o_concept/Makefile | 31 -------- testcases/proof_o_concept/PM-list_c_states.sh | 36 --------- testcases/proof_o_concept/PM-list_p_states.sh | 32 -------- 15 files changed, 0 insertions(+), 689 deletions(-) delete mode 100644 run_template delete mode 100644 testcases.awk delete mode 100644 testcases/Makefile delete mode 100644 testcases/cpufreq/Makefile delete mode 100755 testcases/cpufreq/avail_freq01.sh delete mode 100755 testcases/cpufreq/avail_freq02.sh delete mode 100755 testcases/cpufreq/avail_gov01.sh delete mode 100755 testcases/cpufreq/avail_gov02.sh delete mode 100644 testcases/cpuhotplug/Makefile delete mode 100755 testcases/cpuhotplug/cpu_hotplug_latency.sh delete mode 100644 testcases/cpuidle/Makefile delete mode 100644 testcases/cpuidle/test_usb_cpuidle.c delete mode 100644 testcases/proof_o_concept/Makefile delete mode 100755 testcases/proof_o_concept/PM-list_c_states.sh delete mode 100755 testcases/proof_o_concept/PM-list_p_states.sh diff --git a/run_template b/run_template deleted file mode 100644 index 8c866f9..0000000 --- a/run_template +++ /dev/null @@ -1,7 +0,0 @@ -pm-qa-cexists proof_o_concept PM-list_c_states.sh -pm-qa-pexists proof_o_concept PM-list_p_states.sh -pm-qa-availfreq01 cpufreq avail_freq01.sh -pm-qa-availfreq02 cpufreq avail_freq02.sh -pm-qa-availgov01 cpufreq avail_gov01.sh -pm-qa-availgov02 cpufreq avail_gov02.sh -pm-qa-cpuidle cpuidle test_usb_cpuidle /dev/sdb 5 10000 diff --git a/testcases.awk b/testcases.awk deleted file mode 100644 index 71ce9ee..0000000 --- a/testcases.awk +++ /dev/null @@ -1,40 +0,0 @@ -# -# PM-QA validation test suite for the power management on Linux -# -# Copyright (C) 2011, 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. -# -# Contributors: -# Torez Smith (IBM Corporation) -# - initial API and implementation -# - -### - # For a series of power management related test, cycle through and - # execute. Each test to be executed is in file testcases where the - # following columns make sense.... - # column 1: name of the test case - # column 2: sub directory housing the test - # column 3: name of file for the test case - # column 4: from column 4 onwards, any arguments to pass on to the test -### -{ - printf $1 ": " - cmd = "cd ./testcases/"$2 " ; sudo ./"$3 " " substr($0, length($1 $2 $3) +4) - system(cmd) - printf "\n" -} - diff --git a/testcases/Makefile b/testcases/Makefile deleted file mode 100644 index 08b3233..0000000 --- a/testcases/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# -# PM-QA validation test suite for the power management on Linux -# -# Copyright (C) 2011, 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. -# -# Contributors: -# Torez Smith (IBM Corporation) -# - initial API and implementation -# - -tmp := $(shell find -maxdepth 2 -mindepth 2 -name Makefile) -paths := $(subst Makefile, ,$(tmp)) -SUBDIRS := $(subst ./, ,$(paths)) - -.PHONY: $(SUBDIRS) - -all: - @for X in $(SUBDIRS) ; do $(MAKE) -C $$X all ; done; - - -clean: - @for X in $(SUBDIRS) ; do $(MAKE) -C $$X clean; done; - - - diff --git a/testcases/cpufreq/Makefile b/testcases/cpufreq/Makefile deleted file mode 100644 index 65afd9a..0000000 --- a/testcases/cpufreq/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# -# PM-QA validation test suite for the power management on Linux -# -# Copyright (C) 2011, 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. -# -# Contributors: -# Torez Smith (IBM Corporation) -# - initial API and implementation -# - -testcases = avail_freq01.sh avail_freq02.sh avail_gov01.sh avail_gov02.sh - -all: - @for t in $(testcases) ; do chmod +x $$t; done; - -clean: - @for t in $(testcases) ; do chmod -x $$t; done; diff --git a/testcases/cpufreq/avail_freq01.sh b/testcases/cpufreq/avail_freq01.sh deleted file mode 100755 index 1809e46..0000000 --- a/testcases/cpufreq/avail_freq01.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# -# PM-QA validation test suite for the power management on Linux -# -# Copyright (C) 2011, 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. -# -# Contributors: -# Torez Smith (IBM Corporation) -# - initial API and implementation -# - -# Description : We are checking the frequency scaling file system is -# available. This test checks we have the framework to run the other -# tests in order to test the ability to monitor and/or alter cpu -# frequency on the board, let's assure the basic files are there. - -CPU_PATH="/sys/devices/system/cpu" - -check_freq() { - if [ ! -f $CPU_PATH/$1/cpufreq/scaling_available_frequencies ] ; then - echo "NA no added frequencies" - return 1; - fi - - if [ ! -f $CPU_PATH/$1/cpufreq/scaling_cur_freq ] ; then - echo "missing current frequency file" - return 1; - fi - - if [ ! -f $CPU_PATH/$1/cpufreq/scaling_setspeed ] ; then - echo "missing file to set frequency speed" - return 1; - fi - - echo "PASS `cat $CPU_PATH/$1/cpufreq/scaling_available_frequencies `" - return 0; -} - -for i in $(ls $CPU_PATH | grep "cpu[0-9].*"); do - check_freq $i -done - diff --git a/testcases/cpufreq/avail_freq02.sh b/testcases/cpufreq/avail_freq02.sh deleted file mode 100755 index b012317..0000000 --- a/testcases/cpufreq/avail_freq02.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -# -# PM-QA validation test suite for the power management on Linux -# -# Copyright (C) 2011, 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. -# -# Contributors: -# Torez Smith (IBM Corporation) -# - initial API and implementation -# - -### - # Track how much time it takes to cycle through a loop 1000 times at this current frequency -### -loop_it() { - LOOP_LIMIT=1000 - time while ( test $LOOP_LIMIT -ge 1 ); do - LOOP_LIMIT=$(( $LOOP_LIMIT - 1 )) - done -} - - -### - # set governor to be user space governor which allows you to manually alter the frequency -### -echo "userspace" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor -if [ $? != 0 ]; then - echo "FAIL could not change governor to userspace, remained `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`" - exit -1 -fi - - -### - # Now loop through, changing the cpu frequency to available frequencies. Sleep for a - # period of about 5 seconds each time it's set to a new frequency to allow the system - # to settle down. -### -for LOOP_FREQ in `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies` -do - echo $LOOP_FREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed - if [ $? != 0 ]; then - echo "FAIL could not write freq for $LOOP_FREQ" - exit -1 - fi - sleep 5 - if [ `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq` != $LOOP_FREQ ]; then - echo "FAIL could not change freq to $LOOP_FREQ remained `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq`" - exit -1 - fi - loop_it -done - -echo PASS - diff --git a/testcases/cpufreq/avail_gov01.sh b/testcases/cpufreq/avail_gov01.sh deleted file mode 100755 index d2c8f1c..0000000 --- a/testcases/cpufreq/avail_gov01.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# -# PM-QA validation test suite for the power management on Linux -# -# Copyright (C) 2011, 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. -# -# Contributors: -# Torez Smith (IBM Corporation) -# - initial API and implementation -# - -### - # Simple test to assure governor support for cpu frequency altering is possible. - # Assure the files are available that allow you to switch between governors. -### -if [ -d /sys/devices/system/cpu/cpu0/cpufreq ] ; then - if [ ! -f /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors ] ; then - echo "NA no added frequencies" - exit -1; - fi - if [ ! -f /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ] ; then - echo "FAIL missing scaling governor file" - exit -1; - fi - echo "PASS `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors `" - exit 0; -else - echo "NA no added frequencies" - exit -1; -fi - diff --git a/testcases/cpufreq/avail_gov02.sh b/testcases/cpufreq/avail_gov02.sh deleted file mode 100755 index 3e07d80..0000000 --- a/testcases/cpufreq/avail_gov02.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# PM-QA validation test suite for the power management on Linux -# -# Copyright (C) 2011, 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. -# -# Contributors: -# Torez Smith (IBM Corporation) -# - initial API and implementation -# - -### - # For each available governor, can we change the cpu governor to - # that new value? Sleep a few seconds after changing to allow system - # to settle down. -### - -for i in `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors` -do - echo $i > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - if [ $? != 0 ]; then - echo "FAIL can not write governor for $i" - exit -1 - fi - sleep 5 - if [ `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor` != $i ]; then - echo "FAIL could not change governor to $i" - exit -1 - fi -done - -echo PASS - - diff --git a/testcases/cpuhotplug/Makefile b/testcases/cpuhotplug/Makefile deleted file mode 100644 index ab92602..0000000 --- a/testcases/cpuhotplug/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# -# PM-QA validation test suite for the power management on Linux -# -# Copyright (C) 2011, 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. -# -# Contributors: -# Torez Smith (IBM Corporation) -# - initial API and implementation -# - -testcases = cpu_hotplug_latency.sh - -all: - @for t in $(testcases) ; do chmod +x $$t; done; - -clean: - @for t in $(testcases) ; do chmod -x $$t; done; - rm -rf test_load.txt diff --git a/testcases/cpuhotplug/cpu_hotplug_latency.sh b/testcases/cpuhotplug/cpu_hotplug_latency.sh deleted file mode 100755 index 9fb63f1..0000000 --- a/testcases/cpuhotplug/cpu_hotplug_latency.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/sh -# -# PM-QA validation test suite for the power management on Linux -# -# Copyright (C) 2011, 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. -# -# Contributors: -# Torez Smith (IBM Corporation) -# - initial API and implementation -# - -PWD=pwd - -echo 0 > /sys/kernel/debug/tracing/tracing_on - -echo 1 > /sys/kernel/debug/tracing/events/cpu_hotplug/enable - -# echo "**** TEST LOADED CPU*****" - -LOOP=10 -MAX_PROCESS=$LOOP - -while ( test $LOOP -ge 0 ); do - - PROCESS=$LOOP - - while ( test $PROCESS -lt $MAX_PROCESS ); do - # echo "**** Start cyclictest *****" - cyclictest -D 180 -t 10 -q > /dev/null & - PROCESS=$(( $PROCESS + 1 )) - done - - ILOOP=20 - echo 1 > /sys/kernel/debug/tracing/tracing_on - - while ( test $ILOOP -ge 1 ); do - - # echo "**** TEST " $ILOOP " *****" - # echo "" - - sleep 1 - -# echo -n "Disabling CPU1 ... " - echo 0 > /sys/devices/system/cpu/cpu1/online - # echo "Disable" - - sleep 1 - -# echo -n "Enabling CPU1 ... " - echo 1 > /sys/devices/system/cpu/cpu1/online - # echo "Enable" - - sleep 1 - - ILOOP=$(( $ILOOP - 1 )) - - done - - echo 0 > /sys/kernel/debug/tracing/tracing_on - - LIST=`ps | grep cyclictest | awk '{ print $1 }'` - - for I in $LIST; do - # echo "**** Kill cyclictest *****" - kill $I - done - - LOOP=$(( $LOOP - 1 )) - -done - -cat /sys/kernel/debug/tracing/trace > $PWD/test_load.txt - -echo "PASS" diff --git a/testcases/cpuidle/Makefile b/testcases/cpuidle/Makefile deleted file mode 100644 index 64a9f79..0000000 --- a/testcases/cpuidle/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# -# PM-QA validation test suite for the power management on Linux -# -# Copyright (C) 2011, 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. -# -# Contributors: -# Torez Smith (IBM Corporation) -# - initial API and implementation -# - -CC=gcc -CFLAGS=-Wall - -all: test_usb_cpuidle - -clean: - rm -f test_usb_cpuidle test_usb_cpuidle.o - - - diff --git a/testcases/cpuidle/test_usb_cpuidle.c b/testcases/cpuidle/test_usb_cpuidle.c deleted file mode 100644 index 9f12161..0000000 --- a/testcases/cpuidle/test_usb_cpuidle.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * PM-QA validation test suite for the power management on Linux - * - * Copyright (C) 2011, 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. - * - * Contributors: - * Torez Smith (IBM Corporation) - * - initial API and implementation - */ - -#include -#include -#include -#include -//void usleep(unsigned long usec); - - -#define MAX_COUNT 1024 -int main(int argc, char *argv[]) -{ - int err = 0; - FILE *fp = 0; - int byteCount = 0; - int iterCount = 0; - char dataArray[MAX_COUNT]; -/* - printf("\nUSB mass storage test: parameters --device_name, byte to read, times to run\n"); -*/ - if(argc!=4) { - printf("Error: No of argumets not proper\n"); - return 0; - } - byteCount = atoi(argv[2]); - iterCount = atoi(argv[3]); -/* - printf("Device to open=%s, bytes read =%d, iteration =%d\n",argv[1], byteCount, iterCount); -*/ - fp = fopen(argv[1], "r"); - if(fp == NULL) - { - printf("Error: Invalid device name passed\n"); - return 0; - } - - /*Init random generator*/ - srand((unsigned int)time(NULL)); - while(iterCount != 0) { - /*read from the begining*/ - err = fread(dataArray,1,byteCount,fp); - if(err < 0) { - printf("Error: Data read failed\n"); - return 0; - } - fseek(fp,((iterCount%5)*100*1024), SEEK_SET); - if(err < 0) { - printf("Error: Data seek failed\n"); - return 0; - } - - /*read from somewhere in the middle*/ - err = fread(dataArray,1,byteCount,fp); - if(err < 0) { - printf("Error: Data read failed\n"); - return 0; - } - fseek(fp, byteCount, SEEK_END); - if(err < 0) { - printf("Error: Data seek failed\n"); - return 0; - } - - /*read from the end*/ - err = fread(dataArray,1,byteCount,fp); - if(err < 0) { - printf("Error: Data read failed\n"); - return 0; - } - - rewind(fp); - iterCount--; - fclose(fp); - /*sleep between 1ms to 50ms*/ - usleep(((rand()%50) + 1)*1000); - fp = fopen(argv[1], "r"); - } - fclose(fp); - return 0; -} diff --git a/testcases/proof_o_concept/Makefile b/testcases/proof_o_concept/Makefile deleted file mode 100644 index 6d54932..0000000 --- a/testcases/proof_o_concept/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# -# PM-QA validation test suite for the power management on Linux -# -# Copyright (C) 2011, 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. -# -# Contributors: -# Torez Smith (IBM Corporation) -# - initial API and implementation -# - -testcases = PM-list_c_states.sh PM-list_p_states.sh - -all: - @for t in $(testcases) ; do chmod +x $$t; done; - -clean: - @for t in $(testcases) ; do chmod -x $$t; done; diff --git a/testcases/proof_o_concept/PM-list_c_states.sh b/testcases/proof_o_concept/PM-list_c_states.sh deleted file mode 100755 index f274419..0000000 --- a/testcases/proof_o_concept/PM-list_c_states.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# -# PM-QA validation test suite for the power management on Linux -# -# Copyright (C) 2011, 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. -# -# Contributors: -# Torez Smith (IBM Corporation) -# - initial API and implementation -# - -### - # Determine which CPUidle C States are defined on this system by - # cycling through the sysfs files for cpuidle. -### - -for state in `cat /sys/devices/system/cpu/cpu0/cpuidle/state*/name` -do - test_case=$test_case' '$state -done - -echo $test_case diff --git a/testcases/proof_o_concept/PM-list_p_states.sh b/testcases/proof_o_concept/PM-list_p_states.sh deleted file mode 100755 index 8c592bf..0000000 --- a/testcases/proof_o_concept/PM-list_p_states.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# -# PM-QA validation test suite for the power management on Linux -# -# Copyright (C) 2011, 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. -# -# Contributors: -# Torez Smith (IBM Corporation) -# - initial API and implementation -# - -### - # Determine which CPUidle P States are defined on this system by - # cycling through the sysfs files for cpufreq. -### - -echo `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies` -