From patchwork Mon Oct 3 08:18:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 4482 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 C477523F57 for ; Mon, 3 Oct 2011 08:20:47 +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 BAF9DA181A0 for ; Mon, 3 Oct 2011 08:20:47 +0000 (UTC) Received: by mail-ey0-f180.google.com with SMTP id 6so3380973eyb.11 for ; Mon, 03 Oct 2011 01:20:47 -0700 (PDT) Received: by 10.223.45.140 with SMTP id e12mr16185550faf.27.1317630047498; Mon, 03 Oct 2011 01:20:47 -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 n10cs6255laf; Mon, 3 Oct 2011 01:20:47 -0700 (PDT) Received: by 10.216.158.140 with SMTP id q12mr7350319wek.8.1317630046628; Mon, 03 Oct 2011 01:20:46 -0700 (PDT) Received: from smtp.smtpout.orange.fr (smtp11.smtpout.orange.fr. [80.12.242.133]) by mx.google.com with ESMTP id s79si9918063weq.39.2011.10.03.01.20.46; Mon, 03 Oct 2011 01:20:46 -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 g8Lj1h0021mlJK6038Ll3r; Mon, 03 Oct 2011 10:20:46 +0200 X-ME-engine: default From: Daniel Lezcano To: linaro-dev@lists.linaro.org Subject: [pm-qa 05/10] test the affinity does not work on an offline cpu Date: Mon, 3 Oct 2011 10:18:30 +0200 Message-Id: <1317629915-31767-5-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_03 + +source ../include/functions.sh + +check_affinity_fails() { + local cpu=$1 + local cpuid=${cpu:3} + local dirpath=$CPU_PATH/$1 + local ret= + + if [ "$cpu" == "cpu0" ]; then + return 0 + fi + + set_offline $cpu + + taskset -c $cpuid /bin/true + ret=$? + check "setting affinity on cpu fails" "test $ret -ne 0" + + set_online $cpu + + return 0 +} + +for_each_cpu check_affinity_fails \ No newline at end of file diff --git a/cpuhotplug/cpuhotplug_03.txt b/cpuhotplug/cpuhotplug_03.txt new file mode 100644 index 0000000..09eb1d9 --- /dev/null +++ b/cpuhotplug/cpuhotplug_03.txt @@ -0,0 +1 @@ +test the affinity does not work on an offline cpu