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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For latest kernel, the device name of ide disk is 'sd*',
not 'hd*'.

Signed-off-by: Amos Kong <akong@xxxxxxxxxx>
---
 client/tests/kvm/tests/enospc.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

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")

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux