From: Ryan Harper Subject: [PATCH 5 of 5] Add testcase for vcpu-pin all Date: Wed, 16 Aug 2006 15:49:39 -0500 Message-ID: <27fdbe03de014cf64019.1155761379@localhost.localdomain> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org 2 files changed, 56 insertions(+), 1 deletion(-) tools/xm-test/tests/vcpu-pin/02_vcpu-pin_all_pos.py | 54 +++++++++++++++++++ tools/xm-test/tests/vcpu-pin/Makefile.am | 3 - # HG changeset patch # User Ryan Harper # Date 1155579519 18000 # Node ID 27fdbe03de014cf640190081d2a61da246dac7a1 # Parent 556a93b6cca9b99b2ad0a2d6dcc24dc1a3a581ad Add testcase for vcpu-pin all diff -r 556a93b6cca9 -r 27fdbe03de01 tools/xm-test/tests/vcpu-pin/Makefile.am --- a/tools/xm-test/tests/vcpu-pin/Makefile.am Mon Aug 14 13:18:03 2006 -0500 +++ b/tools/xm-test/tests/vcpu-pin/Makefile.am Mon Aug 14 13:18:39 2006 -0500 @@ -1,7 +1,8 @@ SUBDIRS = -TESTS = 01_vcpu-pin_basic_pos.test +TESTS = 01_vcpu-pin_basic_pos.test \ + 02_vcpu-pin_all_pos.py XFAIL_TESTS = diff -r 556a93b6cca9 -r 27fdbe03de01 tools/xm-test/tests/vcpu-pin/02_vcpu-pin_all_pos.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/xm-test/tests/vcpu-pin/02_vcpu-pin_all_pos.py Mon Aug 14 13:18:39 2006 -0500 @@ -0,0 +1,54 @@ +#!/usr/bin/python + +# Copyright (C) International Business Machines Corp., 2005 +# Author(s): Dan Smith +# : Ryan Harper = start+20: + FAIL("Failed to bring all VCPUS online for test") + time.sleep(1) + +status, output = traceCommand("xm vcpu-pin %s all 0" % domain.getName()) + +if status != 0: + FAIL("xm vcpu-pin returned invalid %i != 0" % status) + +v2c = vcpu_to_cpu(domain.getName()) +for vcpu in range(0,vcpus): + if int(v2c[vcpu]) != 0: + FAIL("failed to switch VCPU %s to CPU 0"%(vcpu)) + +domain.stop()