All of lore.kernel.org
 help / color / mirror / Atom feed
* [KVM-AUTOTEST PATCH] tests/kvm: fix -net syntax for new qemu
@ 2010-09-13 17:43 Michael S. Tsirkin
  2010-09-14  0:55 ` Amos Kong
  2010-09-14  2:02 ` Lucas Meneghel Rodrigues
  0 siblings, 2 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2010-09-13 17:43 UTC (permalink / raw)
  To: autotest, kvm

netdev option in new qemu is mutually exclusive with vlan.
Only pass vlan if netdev option is missing.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

---

diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index bdc9aab..7e76ed5 100755
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -235,9 +235,10 @@ class VM:
             return cmd
 
         def add_nic(help, vlan, model=None, mac=None, netdev_id=None):
-            cmd = " -net nic,vlan=%d" % vlan
             if has_option(help, "netdev"):
-                cmd +=",netdev=%s" % netdev_id
+                cmd = " -net nic,netdev=%s" % netdev_id
+            else:
+                cmd = " -net nic,vlan=%d" % vlan
             if model: cmd += ",model=%s" % model
             if mac: cmd += ",macaddr='%s'" % mac
             return cmd

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-14 12:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-13 17:43 [KVM-AUTOTEST PATCH] tests/kvm: fix -net syntax for new qemu Michael S. Tsirkin
2010-09-14  0:55 ` Amos Kong
2010-09-14 11:55   ` Michael S. Tsirkin
2010-09-14  2:02 ` Lucas Meneghel Rodrigues

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.