source: trunk/packages/xen-3.1/xen-3.1/tools/xm-test/tests/sedf/02_sedf_period_lower_neg.py @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

  • Property svn:mime-type set to text/script
File size: 1.1 KB
Line 
1#!/usr/bin/python
2
3# Copyright (C) International Business Machines Corp., 2005
4# Author: Dan Smith <danms@us.ibm.com>
5# Author: Ryan Harper <ryanh@us.ibm.com>
6#
7# Test if sched-sedf <dom> -p <period> handles lower bound
8
9from XmTestLib import *
10
11def get_sedf_params(domain):
12    status, output = traceCommand("xm sched-sedf %s" %(domain.getName()))
13    return (status, output.split('\n')[1].split())
14
15
16domain = XmTestDomain(extraConfig = {"sched":"sedf"})
17
18try:
19    domain.start(noConsole=True)
20except DomainError, e:
21    if verbose:
22        print "Failed to create test domain because:"
23        print e.extra
24    FAIL(str(e))
25
26# pick bogus period
27period = "-1"
28
29# NB: setting period requires non-zero slice
30# scale current period in half
31slice  = "5"
32
33opts = "%s -p %s -s %s" %(domain.getName(), period, slice)
34(status, output) = traceCommand("xm sched-sedf %s" %(opts))
35
36# we should see this output from xm
37eyecatcher = "Failed to set sedf parameters"
38
39# check for failure
40if output.find(eyecatcher) >= 0:
41    FAIL("sched-sedf let me set bogus period (%s)" %(period))
42
43# Stop the domain (nice shutdown)
44domain.stop()
Note: See TracBrowser for help on using the repository browser.