mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 06:44:23 +01:00
qemu: Allow disable-modern option from QMP
For devices that actually support the option disable-modern, this current commit provides a proper flag to the caller. This will allow for better support when used in nested environment as virtio-pci devices should rely on virtio 0.9 instead of 1.0 due to a bug in KVM. Fixes #80 Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
@@ -528,7 +528,7 @@ func TestQMPNetPCIDeviceAdd(t *testing.T) {
|
||||
cfg := QMPConfig{Logger: qmpTestLogger{}}
|
||||
q := startQMPLoop(buf, cfg, connectedCh, disconnectedCh)
|
||||
checkVersion(t, connectedCh)
|
||||
err := q.ExecuteNetPCIDeviceAdd(context.Background(), "br0", "virtio-0", "02:42:ac:11:00:02", "0x7", "", "", 8)
|
||||
err := q.ExecuteNetPCIDeviceAdd(context.Background(), "br0", "virtio-0", "02:42:ac:11:00:02", "0x7", "", "", 8, false)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error %v", err)
|
||||
}
|
||||
@@ -569,7 +569,7 @@ func TestQMPDeviceAdd(t *testing.T) {
|
||||
blockdevID := fmt.Sprintf("drive_%s", volumeUUID)
|
||||
devID := fmt.Sprintf("device_%s", volumeUUID)
|
||||
err := q.ExecuteDeviceAdd(context.Background(), blockdevID, devID,
|
||||
"virtio-blk-pci", "", "", true)
|
||||
"virtio-blk-pci", "", "", true, false)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error %v", err)
|
||||
}
|
||||
@@ -594,7 +594,7 @@ func TestQMPSCSIDeviceAdd(t *testing.T) {
|
||||
blockdevID := fmt.Sprintf("drive_%s", volumeUUID)
|
||||
devID := fmt.Sprintf("device_%s", volumeUUID)
|
||||
err := q.ExecuteSCSIDeviceAdd(context.Background(), blockdevID, devID,
|
||||
"scsi-hd", "scsi0.0", "", 1, 2, true)
|
||||
"scsi-hd", "scsi0.0", "", 1, 2, true, false)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error %v", err)
|
||||
}
|
||||
@@ -1012,7 +1012,7 @@ func TestQMPPCIDeviceAdd(t *testing.T) {
|
||||
blockdevID := fmt.Sprintf("drive_%s", volumeUUID)
|
||||
devID := fmt.Sprintf("device_%s", volumeUUID)
|
||||
err := q.ExecutePCIDeviceAdd(context.Background(), blockdevID, devID,
|
||||
"virtio-blk-pci", "0x1", "", "", true)
|
||||
"virtio-blk-pci", "0x1", "", "", true, false)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user