From patchwork Mon Oct 3 08:18:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 4480 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 D588223F57 for ; Mon, 3 Oct 2011 08:20:46 +0000 (UTC) Received: from mail-bw0-f52.google.com (mail-bw0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id C5197A181A0 for ; Mon, 3 Oct 2011 08:20:46 +0000 (UTC) Received: by bke5 with SMTP id 5so6812441bke.11 for ; Mon, 03 Oct 2011 01:20:46 -0700 (PDT) Received: by 10.223.63.8 with SMTP id z8mr10650799fah.84.1317630046452; Mon, 03 Oct 2011 01:20:46 -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.152.23.170 with SMTP id n10cs6253laf; Mon, 3 Oct 2011 01:20:46 -0700 (PDT) Received: by 10.227.200.15 with SMTP id eu15mr6118082wbb.77.1317630045588; Mon, 03 Oct 2011 01:20:45 -0700 (PDT) Received: from smtp.smtpout.orange.fr (smtp11.smtpout.orange.fr. [80.12.242.133]) by mx.google.com with ESMTP id fi7si9889813wbb.145.2011.10.03.01.20.45; Mon, 03 Oct 2011 01:20:45 -0700 (PDT) Received-SPF: neutral (google.com: 80.12.242.133 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=80.12.242.133; Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.133 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: from monster.dhcp.lxc ([90.60.119.82]) by mwinf5d34 with ME id g8Lj1h0021mlJK6038Lk3f; Mon, 03 Oct 2011 10:20:45 +0200 X-ME-engine: default From: Daniel Lezcano To: linaro-dev@lists.linaro.org Subject: [pm-qa 03/10] check the files are present Date: Mon, 3 Oct 2011 10:18:28 +0200 Message-Id: <1317629915-31767-3-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1317629915-31767-1-git-send-email-daniel.lezcano@linaro.org> References: <1317629915-31767-1-git-send-email-daniel.lezcano@linaro.org> Signed-off-by: Daniel Lezcano (IBM Corporation) +# - initial API and implementation +# + +# URL : https://wiki.linaro.org/WorkingGroups/PowerManagement/Doc/QA/Scripts#cpuhotplug_01 + +source ../include/functions.sh + +FILES="online offline possible present" + +for i in $FILES; do + check_file $i $CPU_PATH || return 1 +done + +for_each_cpu check_cpuhotplug_files online diff --git a/cpuhotplug/cpuhotplug_01.txt b/cpuhotplug/cpuhotplug_01.txt new file mode 100644 index 0000000..047f13a --- /dev/null +++ b/cpuhotplug/cpuhotplug_01.txt @@ -0,0 +1 @@ +test the sysfs files are present diff --git a/include/functions.sh b/include/functions.sh index bff8e13..b2a8b47 100644 --- a/include/functions.sh +++ b/include/functions.sh @@ -236,6 +236,18 @@ check_topology_files() { return 0 } +check_cpuhotplug_files() { + + local dirpath=$CPU_PATH/$1 + shift 1 + + for i in $@; do + check_file $i $dirpath || return 1 + done + + return 0 +} + save_governors() { governors_backup=