From patchwork Mon Oct 3 08:18:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 4485 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 0F67A23F6E for ; Mon, 3 Oct 2011 08:20:49 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id 01B44A181A6 for ; Mon, 3 Oct 2011 08:20:48 +0000 (UTC) Received: by mail-ey0-f180.google.com with SMTP id 6so3380973eyb.11 for ; Mon, 03 Oct 2011 01:20:48 -0700 (PDT) Received: by 10.223.26.26 with SMTP id b26mr5760995fac.122.1317630048831; Mon, 03 Oct 2011 01:20:48 -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 n10cs6259laf; Mon, 3 Oct 2011 01:20:48 -0700 (PDT) Received: by 10.227.208.20 with SMTP id ga20mr2679570wbb.10.1317630048238; Mon, 03 Oct 2011 01:20:48 -0700 (PDT) Received: from smtp.smtpout.orange.fr (smtp11.smtpout.orange.fr. [80.12.242.133]) by mx.google.com with ESMTP id fi7si9889908wbb.145.2011.10.03.01.20.48; Mon, 03 Oct 2011 01:20:48 -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 g8Lj1h0021mlJK6038Ln4D; Mon, 03 Oct 2011 10:20:47 +0200 X-ME-engine: default From: Daniel Lezcano To: linaro-dev@lists.linaro.org Subject: [pm-qa 08/10] check /proc/interrupts when offlining a cpu Date: Mon, 3 Oct 2011 10:18:33 +0200 Message-Id: <1317629915-31767-8-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_06 + +source ../include/functions.sh + +check_procinfo() { + local cpu=$1 + local cpuid=${cpu:3} + local ret= + + if [ "$cpu" == "cpu0" ]; then + return 0 + fi + + set_offline $cpu + + grep "CPU$cpuid" /proc/interrupts + ret=$? + + check "offline processor not found in interrupts" "test $ret -ne 0" + + set_online $cpu +} + +for_each_cpu check_procinfo diff --git a/cpuhotplug/cpuhotplug_06.txt b/cpuhotplug/cpuhotplug_06.txt new file mode 100644 index 0000000..1edab7c --- /dev/null +++ b/cpuhotplug/cpuhotplug_06.txt @@ -0,0 +1 @@ +test interrupts show the right configuration in /proc/interrupts