|
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:
1013 bytes
|
| 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 | |
|---|
| 9 | from XmTestLib import * |
|---|
| 10 | |
|---|
| 11 | def get_sedf_params(domain): |
|---|
| 12 | status, output = traceCommand("xm sched-sedf %s" %(domain.getName())) |
|---|
| 13 | return (status, output.split('\n')[1].split()) |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | domain = XmTestDomain(extraConfig = {"sched":"sedf"}) |
|---|
| 17 | |
|---|
| 18 | try: |
|---|
| 19 | domain.start(noConsole=True) |
|---|
| 20 | except 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 slice |
|---|
| 27 | slice = "0" |
|---|
| 28 | |
|---|
| 29 | opts = "%s -s %s" %(domain.getName(), slice) |
|---|
| 30 | (status, output) = traceCommand("xm sched-sedf %s" %(opts)) |
|---|
| 31 | |
|---|
| 32 | # we should see this output from xm |
|---|
| 33 | eyecatcher = "Failed to set sedf parameters" |
|---|
| 34 | |
|---|
| 35 | # check for failure |
|---|
| 36 | if output.find(eyecatcher) >= 0: |
|---|
| 37 | FAIL("sched-sedf let me set bogus slice (%s)" %(slice)) |
|---|
| 38 | |
|---|
| 39 | # Stop the domain (nice shutdown) |
|---|
| 40 | domain.stop() |
|---|
Note: See
TracBrowser
for help on using the repository browser.