Index: client/tests/kvm/tests/iofuzz.py |
diff --git a/client/tests/kvm/tests/iofuzz.py b/client/tests/kvm/tests/iofuzz.py |
index e77540eb2ffcc2eb82df5ea01635e5e8b0e5a501..45a0eb99ae5659534367092a18e5ce4625b6b2c9 100644 |
--- a/client/tests/kvm/tests/iofuzz.py |
+++ b/client/tests/kvm/tests/iofuzz.py |
@@ -33,10 +33,11 @@ def run_iofuzz(test, params, env): |
logging.debug("outb(0x%x, 0x%x)", port, data) |
outb_cmd = ("echo -e '\\%s' | dd of=/dev/port seek=%d bs=1 count=1" % |
(oct(data), port)) |
- try: |
- session.cmd(outb_cmd) |
- except kvm_subprocess.ShellError, e: |
- logging.debug(e) |
+ s, o = session.get_command_status_output(outb_cmd) |
+ if s is None: |
+ logging.debug("Command did not return") |
+ if s != 0: |
+ logging.debug("Command returned status %s", s) |
def inb(session, port): |
@@ -48,10 +49,11 @@ def run_iofuzz(test, params, env): |
""" |
logging.debug("inb(0x%x)", port) |
inb_cmd = "dd if=/dev/port seek=%d of=/dev/null bs=1 count=1" % port |
- try: |
- session.cmd(inb_cmd) |
- except kvm_subprocess.ShellError, e: |
- logging.debug(e) |
+ s, o = session.get_command_status_output(inb_cmd) |
+ if s is None: |
+ logging.debug("Command did not return") |
+ if s != 0: |
+ logging.debug("Command returned status %s", s) |
def fuzz(session, inst_list): |
@@ -98,7 +100,7 @@ def run_iofuzz(test, params, env): |
r = random.SystemRandom() |
logging.info("Enumerate guest devices through /proc/ioports") |
- ioports = session.cmd_output("cat /proc/ioports") |
+ ioports = session.get_command_output("cat /proc/ioports") |
logging.debug(ioports) |
devices = re.findall("(\w+)-(\w+)\ : (.*)", ioports) |