diff mbox

KVM-test: enospc.py: Fix device name of ide disk

Message ID 20110114085800.26801.20966.stgit@dhcp-91-173.nay.redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Amos Kong Jan. 14, 2011, 8:58 a.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/tests/enospc.py b/client/tests/kvm/tests/enospc.py
index 21ea24e..837d73f 100644
--- a/client/tests/kvm/tests/enospc.py
+++ b/client/tests/kvm/tests/enospc.py
@@ -28,7 +28,8 @@  def run_enospc(test, params, env):
     if drive_format == "virtio":
         devname = "/dev/vdb"
     elif drive_format == "ide":
-        devname = "/dev/hdb"
+        output = session_serial.cmd_output("dir /dev")
+        devname = "/dev/" + re.findall("([sh]db)\s", output)[0]
     elif drive_format == "scsi":
         devname = "/dev/sdb"
     cmd = params.get("background_cmd")