3
# Copyright (C) International Business Machines Corp., 2005
4
# Author: Dan Smith <danms@us.ibm.com>
6
from XmTestLib import *
10
if ENABLE_HVM_SUPPORT:
11
SKIP("Sysrq not supported for HVM domains")
13
domain = XmTestDomain()
16
console = domain.start()
17
except DomainError, e:
19
print "Failed to create domain:"
23
status, output = traceCommand("xm reboot %s" % domain.getName())
25
FAIL("reboot %s failed with %i != 0" % (domain.getName(), status))
27
# Wait for the reboot to finish
30
status, output = traceCommand("xm sysrq %s s" % domain.getName())
32
FAIL("sysrq failed with %i != 0" % status)
35
run = console.runCmd("dmesg | grep -i reboot")
36
except ConsoleError, e:
40
FAIL("reboot/sysrq resulted in reboot!")