KVM test: setup tap fd and pass it to qemu-kvm v3
We used to use qemu-ifup to manage the tap which have several
limitations:
1) If we want to specify a bridge, we must create a customized
qemu-ifup file as the default script always match the first bridge.
2) It's hard to add support for macvtap device.
So this patch let kvm subtest control the tap creation and setup then
pass it to qemu-kvm. User could specify the bridge he want to used in
configuration file.
The original autoconfiguration was changed by private bridge setup.
Changes from v1:
* Combine the private bridge config and TAP fd in one patchset,
dropped the "auto" mode
Changes from v2:
* Close TAP fds on VM.destroy() (thanks to Amos Kong for finding
the problem, and for Cleber and Jason for actually fixing it).
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
git-svn-id: svn://test.kernel.org/autotest/trunk@5402 592f7852-d20e-0410-864c-8624ca9c26a4