ia64/xen-unstable

changeset 9217:3ea1c6118fc2

This patch

-Displays current parameters for running domains ala xm list
-Allow users to set one or more parameters without having to
provide values for parameters they do not wish to change
-Adds additional testing of sched-sedf via new xm-test testcases.

With this patch applied, test 02_sedf_period_lower_neg.py exposes a
bug. I'll follow up this email with a patch for the bug.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
author emellor@leeni.uk.xensource.com
date Fri Mar 10 01:08:59 2006 +0100 (2006-03-10)
parents 8c1badb84c3e
children 8bb494bccdac
files tools/python/xen/xend/XendDomain.py tools/python/xen/xm/main.py tools/xm-test/tests/sedf/01_sedf_period_slice_pos.py tools/xm-test/tests/sedf/02_sedf_period_lower_neg.py tools/xm-test/tests/sedf/03_sedf_slice_lower_neg.py tools/xm-test/tests/sedf/04_sedf_slice_upper_neg.py tools/xm-test/tests/sedf/05_sedf_extratime_pos.py tools/xm-test/tests/sedf/06_sedf_extratime_disable_neg.py tools/xm-test/tests/sedf/Makefile.am
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Fri Mar 10 00:49:54 2006 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Fri Mar 10 01:08:59 2006 +0100
     1.3 @@ -487,7 +487,17 @@ class XendDomain:
     1.4          """
     1.5          dominfo = self.domain_lookup(domid)
     1.6          try:
     1.7 -            return xc.sedf_domain_get(dominfo.getDomid())
     1.8 +            
     1.9 +            sedf_info = xc.sedf_domain_get(dominfo.getDomid())
    1.10 +            # return sxpr
    1.11 +            return ['sedf',
    1.12 +                    ['domain',    sedf_info['domain']],
    1.13 +                    ['period',    sedf_info['period']],
    1.14 +                    ['slice',     sedf_info['slice']],
    1.15 +                    ['latency',   sedf_info['latency']],
    1.16 +                    ['extratime', sedf_info['extratime']],
    1.17 +                    ['weight',    sedf_info['weight']]]
    1.18 +
    1.19          except Exception, ex:
    1.20              raise XendError(str(ex))
    1.21  
     2.1 --- a/tools/python/xen/xm/main.py	Fri Mar 10 00:49:54 2006 +0100
     2.2 +++ b/tools/python/xen/xm/main.py	Fri Mar 10 01:08:59 2006 +0100
     2.3 @@ -83,7 +83,17 @@ sched_bvt_help = """sched-bvt <Parameter
     2.4                                      parameters"""
     2.5  sched_bvt_ctxallow_help = """sched-bvt-ctxallow <Allow>       Set the BVT scheduler context switch
     2.6                                      allowance"""
     2.7 -sched_sedf_help = "sched-sedf <Parameters>          Set simple EDF parameters"
     2.8 +sched_sedf_help = "sched-sedf [DOM] [OPTIONS]       Show|Set simple EDF parameters\n" + \
     2.9 +"              -p, --period          Relative deadline(ns).\n\
    2.10 +              -s, --slice           Worst-case execution time(ns) (slice < period).\n\
    2.11 +              -l, --latency         scaled period(ns) in case the domain is doing\n\
    2.12 +                                    heavy I/O.\n\
    2.13 +              -e, --extra           flag (0/1) which controls whether the\n\
    2.14 +                                    domain can run in extra-time\n\
    2.15 +              -w, --weight          mutually exclusive with period/slice and\n\
    2.16 +                                    specifies another way of setting a domain's\n\
    2.17 +                                    cpu period/slice."
    2.18 +
    2.19  block_attach_help = """block-attach <DomId> <BackDev> <FrontDev> <Mode>
    2.20                  [BackDomId]         Create a new virtual block device"""
    2.21  block_detach_help = """block-detach  <DomId> <DevId>    Destroy a domain's virtual block device,
    2.22 @@ -377,6 +387,20 @@ def parse_doms_info(info):
    2.23          }
    2.24  
    2.25  
    2.26 +def parse_sedf_info(info):
    2.27 +    def get_info(n, t, d):
    2.28 +        return t(sxp.child_value(info, n, d))
    2.29 +
    2.30 +    return {
    2.31 +        'dom'      : get_info('domain',        int,   -1),
    2.32 +        'period'   : get_info('period',        int,   -1),
    2.33 +        'slice'    : get_info('slice',         int,   -1),
    2.34 +        'latency'  : get_info('latency',       int,   -1),
    2.35 +        'extratime': get_info('extratime',     int,   -1),
    2.36 +        'weight'   : get_info('weight',        int,   -1),
    2.37 +        }
    2.38 +
    2.39 +
    2.40  def xm_brief_list(doms):
    2.41      print 'Name                              ID Mem(MiB) VCPUs State  Time(s)'
    2.42      for dom in doms:
    2.43 @@ -617,12 +641,88 @@ def xm_sched_bvt_ctxallow(args):
    2.44      server.xend_node_cpu_bvt_slice_set(slice)
    2.45  
    2.46  def xm_sched_sedf(args):
    2.47 -    arg_check(args, "sched-sedf", 6)
    2.48 +    def print_sedf(info):
    2.49 +        print( ("%(name)-32s %(dom)3d %(period)12d %(slice)12d %(latency)12d" +
    2.50 +                " %(extratime)10d %(weight)7d") % info)
    2.51 +
    2.52 +    # FIXME: this can probably go away if someone points me to the proper way.
    2.53 +    def domid_match(domid, info):
    2.54 +        d = ""
    2.55 +        f = ""
    2.56 +        try:
    2.57 +            d = int(domid)
    2.58 +            f = 'dom'
    2.59 +        except:
    2.60 +            d = domid 
    2.61 +            f = 'name'
    2.62 +
    2.63 +        return (d == info[f])
    2.64 +          
    2.65 +    # we want to just display current info if no parameters are passed
    2.66 +    if len(args) == 0:
    2.67 +        domid = '-1'
    2.68 +    else:
    2.69 +        # we expect at least a domain id (name or number)
    2.70 +        # and at most a domid up to 5 options with values
    2.71 +        arg_check(args, "sched-sedf", 1, 11)
    2.72 +        domid = args[0]
    2.73 +        # drop domid from args since get_opt doesn't recognize it
    2.74 +        args = args[1:] 
    2.75 +
    2.76 +    opts = {}
    2.77 +    try:
    2.78 +        (options, params) = getopt.gnu_getopt(args, 'p:s:l:e:w:',
    2.79 +            ['period=', 'slice=', 'latency=', 'extratime=', 'weight='])
    2.80 +    except getopt.GetoptError, opterr:
    2.81 +        err(opterr)
    2.82 +        sys.exit(1)
    2.83      
    2.84 -    dom = args[0]
    2.85 -    v = map(int, args[1:6])
    2.86 +    for (k, v) in options:
    2.87 +        if k in ['-p', '--period']:
    2.88 +            opts['period'] = v
    2.89 +        elif k in ['-s', '--slice']:
    2.90 +            opts['slice'] = v
    2.91 +        elif k in ['-l', '--latency']:
    2.92 +            opts['latency'] = v
    2.93 +        elif k in ['-e', '--extratime']:
    2.94 +            opts['extratime'] = v
    2.95 +        elif k in ['-w', '--weight']:
    2.96 +            opts['weight'] = v
    2.97 +
    2.98 +    # print header if we aren't setting any parameters
    2.99 +    if len(opts.keys()) == 0:
   2.100 +        print '%-33s %-8s %-13s %-10s %-8s %-10s %-6s' %('Name','ID','Period',
   2.101 +                                                         'Slice', 'Latency',
   2.102 +                                                         'ExtraTime','Weight')
   2.103 +
   2.104      from xen.xend.XendClient import server
   2.105 -    server.xend_domain_cpu_sedf_set(dom, *v)
   2.106 +    for dom in getDomains(""):
   2.107 +        d = parse_doms_info(dom)
   2.108 +        
   2.109 +        if domid == '-1' or domid_match(domid, d):
   2.110 +
   2.111 +            # fetch current values so as not to clobber them
   2.112 +            sedf_info = \
   2.113 +                parse_sedf_info(server.xend_domain_cpu_sedf_get(d['dom']))
   2.114 +            sedf_info['name'] = d['name']
   2.115 +
   2.116 +            # update values in case of call to set
   2.117 +            if len(opts.keys()) > 0:
   2.118 +                for k in opts.keys():
   2.119 +                    sedf_info[k]=opts[k]
   2.120 +            
   2.121 +                # send the update
   2.122 +                v = map(int, [sedf_info['period'],  sedf_info['slice'],
   2.123 +                              sedf_info['latency'], sedf_info['extratime'],
   2.124 +                              sedf_info['weight']])
   2.125 +                rv = server.xend_domain_cpu_sedf_set(d['dom'], *v)
   2.126 +                if int(rv) != 0:
   2.127 +                    err("Failed to set sedf parameters (rv=%d)."%(rv))
   2.128 +
   2.129 +            # not setting values, display info
   2.130 +            else:
   2.131 +                print_sedf(sedf_info)
   2.132 +
   2.133  
   2.134  def xm_info(args):
   2.135      arg_check(args, "info", 0)
     3.1 --- a/tools/xm-test/tests/sedf/01_sedf_multi_pos.py	Fri Mar 10 00:49:54 2006 +0100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,28 +0,0 @@
     3.4 -#!/usr/bin/python
     3.5 -
     3.6 -# Copyright (C) International Business Machines Corp., 2005
     3.7 -# Author: Dan Smith <danms@us.ibm.com>
     3.8 -
     3.9 -from XmTestLib import *
    3.10 -
    3.11 -sedf_opts = "20000000 5000000 0 0 0"
    3.12 -
    3.13 -domain = XmTestDomain(extraConfig = {"sched":"sedf"})
    3.14 -
    3.15 -try:
    3.16 -    domain.start()
    3.17 -except DomainError, e:
    3.18 -    if verbose:
    3.19 -        print "Failed to create test domain because:"
    3.20 -        print e.extra
    3.21 -    FAIL(str(e))
    3.22 -
    3.23 -for i in range(5):
    3.24 -    status, output = traceCommand("xm sched-sedf %s %s" % (domain.getName(),
    3.25 -                                                           sedf_opts))
    3.26 -    if status != 0:
    3.27 -        FAIL("[%i] xm sedf returned invalid %i != 0" % (i, status))
    3.28 -
    3.29 -    
    3.30 -    
    3.31 -
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/tools/xm-test/tests/sedf/01_sedf_period_slice_pos.py	Fri Mar 10 01:08:59 2006 +0100
     4.3 @@ -0,0 +1,62 @@
     4.4 +#!/usr/bin/python
     4.5 +
     4.6 +# Copyright (C) International Business Machines Corp., 2005
     4.7 +# Author: Dan Smith <danms@us.ibm.com>
     4.8 +# Author: Ryan Harper <ryanh@us.ibm.com>
     4.9 +
    4.10 +from XmTestLib import *
    4.11 +
    4.12 +def get_sedf_params(domain):
    4.13 +    status, output = traceCommand("xm sched-sedf %s" %(domain.getName()))
    4.14 +    return (status, output.split('\n')[1].split())
    4.15 +
    4.16 +
    4.17 +domain = XmTestDomain(extraConfig = {"sched":"sedf"})
    4.18 +
    4.19 +try:
    4.20 +    domain.start()
    4.21 +except DomainError, e:
    4.22 +    if verbose:
    4.23 +        print "Failed to create test domain because:"
    4.24 +        print e.extra
    4.25 +    FAIL(str(e))
    4.26 +
    4.27 +# get current param values as baseline
    4.28 +(status, params) = get_sedf_params(domain)
    4.29 +
    4.30 +# check rv
    4.31 +if status != 0:
    4.32 +    FAIL("Getting sedf parameters return non-zero rv (%d)", status)
    4.33 +
    4.34 +# parse out current params
    4.35 +(name, domid, p, s, l, e, w) = params
    4.36 +
    4.37 +# NB: setting period requires non-zero slice 
    4.38 +# scale current period in half
    4.39 +period = str(int(p) / 2)
    4.40 +slice  = str(int(p) / 4)
    4.41 +
    4.42 +opts = "%s -p %s -s %s" %(domain.getName(), period, slice)
    4.43 +(status, output) = traceCommand("xm sched-sedf %s" %(opts))
    4.44 +
    4.45 +# check rv
    4.46 +if status != 0:
    4.47 +    FAIL("Setting sedf parameters return non-zero rv (%d)" % status)
    4.48 +
    4.49 +# validate 
    4.50 +(s,params) = get_sedf_params(domain)
    4.51 +
    4.52 +# check rv
    4.53 +if s != 0:
    4.54 +    FAIL("Getting sedf parameters return non-zero rv (%d)" % s)
    4.55 +
    4.56 +(name,domid,p1,s1,l1,e1,w1) = params
    4.57 +
    4.58 +if p1 != period:
    4.59 +    FAIL("Failed to change domain period from %d to %d" %(p, period))
    4.60 +
    4.61 +if s1 != slice:
    4.62 +    FAIL("Failed to change domain slice from %d to %d" %(s, slice))
    4.63 +
    4.64 +# Stop the domain (nice shutdown)
    4.65 +domain.stop()
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/tools/xm-test/tests/sedf/02_sedf_period_lower_neg.py	Fri Mar 10 01:08:59 2006 +0100
     5.3 @@ -0,0 +1,41 @@
     5.4 +#!/usr/bin/python
     5.5 +
     5.6 +# Copyright (C) International Business Machines Corp., 2005
     5.7 +# Author: Dan Smith <danms@us.ibm.com>
     5.8 +# Author: Ryan Harper <ryanh@us.ibm.com>
     5.9 +#
    5.10 +# Test if sched-sedf <dom> -p <period> handles lower bound 
    5.11 +
    5.12 +from XmTestLib import *
    5.13 +
    5.14 +def get_sedf_params(domain):
    5.15 +    status, output = traceCommand("xm sched-sedf %s" %(domain.getName()))
    5.16 +    return (status, output.split('\n')[1].split())
    5.17 +
    5.18 +
    5.19 +domain = XmTestDomain(extraConfig = {"sched":"sedf"})
    5.20 +
    5.21 +try:
    5.22 +    domain.start()
    5.23 +except DomainError, e:
    5.24 +    if verbose:
    5.25 +        print "Failed to create test domain because:"
    5.26 +        print e.extra
    5.27 +    FAIL(str(e))
    5.28 +
    5.29 +# pick bogus period
    5.30 +period = "-1"
    5.31 +
    5.32 +# NB: setting period requires non-zero slice 
    5.33 +# scale current period in half
    5.34 +slice  = "1"
    5.35 +
    5.36 +opts = "%s -p %s -s %s" %(domain.getName(), period, slice)
    5.37 +(status, output) = traceCommand("xm sched-sedf %s" %(opts))
    5.38 +
    5.39 +# we should see this output from xm 
    5.40 +eyecatcher = "Failed to set sedf parameters"
    5.41 +
    5.42 +# check for failure
    5.43 +if output.find(eyecatcher) >= 0:
    5.44 +    FAIL("sched-sedf let me set bogus period (%s)" %(period))
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/tools/xm-test/tests/sedf/03_sedf_slice_lower_neg.py	Fri Mar 10 01:08:59 2006 +0100
     6.3 @@ -0,0 +1,37 @@
     6.4 +#!/usr/bin/python
     6.5 +
     6.6 +# Copyright (C) International Business Machines Corp., 2005
     6.7 +# Author: Dan Smith <danms@us.ibm.com>
     6.8 +# Author: Ryan Harper <ryanh@us.ibm.com>
     6.9 +#
    6.10 +# Test if sched-sedf <dom> -p <period> handles lower bound 
    6.11 +
    6.12 +from XmTestLib import *
    6.13 +
    6.14 +def get_sedf_params(domain):
    6.15 +    status, output = traceCommand("xm sched-sedf %s" %(domain.getName()))
    6.16 +    return (status, output.split('\n')[1].split())
    6.17 +
    6.18 +
    6.19 +domain = XmTestDomain(extraConfig = {"sched":"sedf"})
    6.20 +
    6.21 +try:
    6.22 +    domain.start()
    6.23 +except DomainError, e:
    6.24 +    if verbose:
    6.25 +        print "Failed to create test domain because:"
    6.26 +        print e.extra
    6.27 +    FAIL(str(e))
    6.28 +
    6.29 +# pick bogus slice
    6.30 +slice  = "0"
    6.31 +
    6.32 +opts = "%s -s %s" %(domain.getName(), slice)
    6.33 +(status, output) = traceCommand("xm sched-sedf %s" %(opts))
    6.34 +
    6.35 +# we should see this output from xm 
    6.36 +eyecatcher = "Failed to set sedf parameters"
    6.37 +
    6.38 +# check for failure
    6.39 +if output.find(eyecatcher) >= 0:
    6.40 +    FAIL("sched-sedf let me set bogus slice (%s)" %(slice)
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/tools/xm-test/tests/sedf/04_sedf_slice_upper_neg.py	Fri Mar 10 01:08:59 2006 +0100
     7.3 @@ -0,0 +1,45 @@
     7.4 +#!/usr/bin/python
     7.5 +
     7.6 +# Copyright (C) International Business Machines Corp., 2005
     7.7 +# Author: Dan Smith <danms@us.ibm.com>
     7.8 +# Author: Ryan Harper <ryanh@us.ibm.com>
     7.9 +
    7.10 +from XmTestLib import *
    7.11 +
    7.12 +def get_sedf_params(domain):
    7.13 +    status, output = traceCommand("xm sched-sedf %s" %(domain.getName()))
    7.14 +    return (status, output.split('\n')[1].split())
    7.15 +
    7.16 +
    7.17 +domain = XmTestDomain(extraConfig = {"sched":"sedf"})
    7.18 +
    7.19 +try:
    7.20 +    domain.start()
    7.21 +except DomainError, e:
    7.22 +    if verbose:
    7.23 +        print "Failed to create test domain because:"
    7.24 +        print e.extra
    7.25 +    FAIL(str(e))
    7.26 +
    7.27 +# get current param values as baseline
    7.28 +(status, params) = get_sedf_params(domain)
    7.29 +
    7.30 +# check rv
    7.31 +if status != 0:
    7.32 +    FAIL("Getting sedf parameters return non-zero rv (%d)", status)
    7.33 +
    7.34 +# parse out current params
    7.35 +(name, domid, p, s, l, e, w) = params
    7.36 +
    7.37 +# set slice > than current period
    7.38 +slice  = str(int(p)+1)
    7.39 +
    7.40 +opts = "%s -s %s" %(domain.getName(), slice)
    7.41 +(status, output) = traceCommand("xm sched-sedf %s" %(opts))
    7.42 +
    7.43 +# we should see this output from xm 
    7.44 +eyecatcher = "Failed to set sedf parameters"
    7.45 +
    7.46 +# check for failure
    7.47 +if output.find(eyecatcher) >= 0:
    7.48 +    FAIL("sched-sedf let me set a slice bigger than my period.")
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/tools/xm-test/tests/sedf/05_sedf_extratime_pos.py	Fri Mar 10 01:08:59 2006 +0100
     8.3 @@ -0,0 +1,63 @@
     8.4 +#!/usr/bin/python
     8.5 +
     8.6 +# Copyright (C) International Business Machines Corp., 2005
     8.7 +# Author: Dan Smith <danms@us.ibm.com>
     8.8 +# Author: Ryan Harper <ryanh@us.ibm.com>
     8.9 +
    8.10 +from XmTestLib import *
    8.11 +
    8.12 +def get_sedf_params(domain):
    8.13 +    status, output = traceCommand("xm sched-sedf %s" %(domain.getName()))
    8.14 +    return (status, output.split('\n')[1].split())
    8.15 +
    8.16 +
    8.17 +domain = XmTestDomain(extraConfig = {"sched":"sedf"})
    8.18 +
    8.19 +try:
    8.20 +    domain.start()
    8.21 +except DomainError, e:
    8.22 +    if verbose:
    8.23 +        print "Failed to create test domain because:"
    8.24 +        print e.extra
    8.25 +    FAIL(str(e))
    8.26 +
    8.27 +# get current param values as baseline
    8.28 +(status, params) = get_sedf_params(domain)
    8.29 +
    8.30 +# check rv
    8.31 +if status != 0:
    8.32 +    FAIL("Getting sedf parameters return non-zero rv (%d)", status)
    8.33 +
    8.34 +# parse out current params
    8.35 +(name, domid, p, s, l, e, w) = params
    8.36 +
    8.37 +# toggle extratime value
    8.38 +extratime = str((int(e)+1)%2)
    8.39 +
    8.40 +direction = "disable"
    8.41 +# NB: when disabling extratime(=0), must pass in a slice
    8.42 +opts = "%s -e %s" %(domain.getName(), extratime)
    8.43 +if extratime == "0":
    8.44 +    opts += " -s %s" %( str( (int(p)/2)+1 ) )
    8.45 +    direction = "enable"
    8.46 +    
    8.47 +(status, output) = traceCommand("xm sched-sedf %s" %(opts))
    8.48 +
    8.49 +# check rv
    8.50 +if status != 0:
    8.51 +   FAIL("Setting sedf parameters return non-zero rv (%d)" % status)
    8.52 +
    8.53 +# validate
    8.54 +(s,params) = get_sedf_params(domain)
    8.55 +
    8.56 +# check rv
    8.57 +if s != 0:
    8.58 +    FAIL("Getting sedf parameters return non-zero rv (%d)" % s)
    8.59 +
    8.60 +(name,domid,p1,s1,l1,e1,w1) = params
    8.61 +
    8.62 +if e1 != extratime:
    8.63 +    FAIL("Failed to %s extratime" %(direction))
    8.64 +
    8.65 +# Stop the domain (nice shutdown)
    8.66 +domain.stop()
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/tools/xm-test/tests/sedf/06_sedf_extratime_disable_neg.py	Fri Mar 10 01:08:59 2006 +0100
     9.3 @@ -0,0 +1,68 @@
     9.4 +#!/usr/bin/python
     9.5 +
     9.6 +# Copyright (C) International Business Machines Corp., 2005
     9.7 +# Author: Dan Smith <danms@us.ibm.com>
     9.8 +# Author: Ryan Harper <ryanh@us.ibm.com>
     9.9 +
    9.10 +from XmTestLib import *
    9.11 +
    9.12 +def get_sedf_params(domain):
    9.13 +    status, output = traceCommand("xm sched-sedf %s" %(domain.getName()))
    9.14 +    return (status, output.split('\n')[1].split())
    9.15 +
    9.16 +
    9.17 +domain = XmTestDomain(extraConfig = {"sched":"sedf"})
    9.18 +
    9.19 +try:
    9.20 +    domain.start()
    9.21 +except DomainError, e:
    9.22 +    if verbose:
    9.23 +        print "Failed to create test domain because:"
    9.24 +        print e.extra
    9.25 +    FAIL(str(e))
    9.26 +
    9.27 +# get current param values as baseline
    9.28 +(status, params) = get_sedf_params(domain)
    9.29 +
    9.30 +# check rv
    9.31 +if status != 0:
    9.32 +    FAIL("Getting sedf parameters return non-zero rv (%d)", status)
    9.33 +
    9.34 +# parse out current params
    9.35 +(name, domid, p, s, l, e, w) = params
    9.36 +
    9.37 +# if extratime is off, turn it on and drop slice to 0
    9.38 +if str(e) == "0":
    9.39 +    extratime = 1
    9.40 +    opts = "%s -e %s" %(domain.getName(), extratime)
    9.41 +    (status, output) = traceCommand("xm sched-sedf %s" %(opts))
    9.42 +
    9.43 +    # check rv
    9.44 +    if status != 0:
    9.45 +        FAIL("Failed to force extratime on (%d)" % status)
    9.46 +
    9.47 +    # drop slice to 0 now that we are in extratime mode
    9.48 +    slice = 0
    9.49 +
    9.50 +    opts = "%s -s %s" %(domain.getName(), slice)
    9.51 +    (status, output) = traceCommand("xm sched-sedf %s" %(opts))
    9.52 +
    9.53 +    # check rv
    9.54 +    if status != 0:
    9.55 +        FAIL("Failed to force slice to 0 (%d)" % status)
    9.56 +
    9.57 +
    9.58 +# ASSERT(extratime=1, slice=0)
    9.59 +
    9.60 +# attempt to disable extratime without setting slice
    9.61 +extratime = "0"
    9.62 +
    9.63 +opts = "%s -e %s " %(domain.getName(), extratime)
    9.64 +(status, output) = traceCommand("xm sched-sedf %s" %(opts))
    9.65 +
    9.66 +# we should see this output from xm 
    9.67 +eyecatcher = "Failed to set sedf parameters"
    9.68 +
    9.69 +# check for failure
    9.70 +if output.find(eyecatcher) >= 0:
    9.71 +    FAIL("sched-sedf let me disable extratime without a non-zero slice")
    10.1 --- a/tools/xm-test/tests/sedf/Makefile.am	Fri Mar 10 00:49:54 2006 +0100
    10.2 +++ b/tools/xm-test/tests/sedf/Makefile.am	Fri Mar 10 01:08:59 2006 +0100
    10.3 @@ -1,7 +1,9 @@
    10.4  
    10.5  SUBDIRS =
    10.6  
    10.7 -TESTS = 01_sedf_multi_pos.test
    10.8 +TESTS = 01_sedf_period_slice_pos.py 02_sedf_period_lower_neg.py \
    10.9 +        03_sedf_slice_lower_neg.py  04_sedf_slice_upper_neg.py  \
   10.10 +        05_sedf_extratime_pos.py 06_sedf_extratime_disable_neg.py
   10.11  
   10.12  XFAIL_TESTS = 
   10.13