KVM test: file_transfer: use random generated file name

Use random generated file name in order to be called in
parallel. Also simply some codes.

Signed-off-by: Jason Wang <jasowang@redhat.com>
KVM test: nicdriver_unload: reuse file_transfer test and Thread class

This test could be greatly simplifiyed by reusing the Thread class and
file_transfer test.

Signed-off-by: Jason Wang <jasowang@redhat.com>
KVM test: pci_hotplug: fix typo

Signed-off-by: Jason Wang <jasowang@redhat.com>
KVM test: nic_promisc: reuse the file_transfer test and Thead class

To reuse the codes and simplify the test.

Signed-off-by: Jason Wang <jasowang@redhat.com>
KVM test: netperf: minimize the influence of autotest

We want to use netperf to do the performance test so the impact of
autotest framework should be minimized as less as possible, so this
patch:

- stop iptables on host
- stop tcpdump process before the netperf test by sending SIGSTOP and
recover it after the test
- use serial console

Signed-off-by: Jason Wang <jasowang@redhat.com>
KVM test: ping: test two nics by default

Ping can test multiple nics, so we can test more nics.

Signed-off-by: Jason Wang <jasowang@redhat.com>
KVM test: Do not load acpiphp on RHEL 6.0

Turns out hotplug for PCI devices is built in
on RHEL 6.0 kernel.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Remove ethtool from rtl8139 variant

As the original patch set doesn't define supported_features
for it.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
KVM test: make_qemu_command(): properly deal with get_mac_address() failure

If VM params define a new NIC that didn't previously exist, then when
make_qemu_command() is called in order to see if the VM should be restarted,
it attempts to get the MAC address of the new (nonexistent) NIC, and an
exception is raised.  This exception is expected and should be caught.

Signed-off-by: Michael Goldish <mgoldish@redhat.com>
KVM test: kvm_vm.py: make 'nic_mac' trigger a VM restart when changed

get_mac_address() should first check if 'nic_mac' is defined and then check
the address pool.  This way, if 'nic_mac' is changed between tests,
make_qemu_command(), which calls get_mac_address(), will reveal the change and
trigger a VM restart.

Signed-off-by: Michael Goldish <mgoldish@redhat.com>
Trying to shutdown the scheduler in a nicer way

Signed-off-by: Jean-Marc Eurin <jmeurin@google.com>
Fix Wrong 4th argument in call to self.job.record()

Signed-off-by: Jongki Suwandi <jsuwandi@google.com>
KVM-test: migration_with_file_transfer.py: Correct the description

The test description in migration_with_file_transfer.py
is same with migration_with_reboot

Signed-off-by: Amos Kong <akong@redhat.com>
KVM test: kvm_config.py: parse extra strings passed as command line args

This allows to quickly see the effect of some extra code, e.g.

./kvm_config.py tests.cfg "only my_set" "no qcow2"

The given strings may contain newlines.

Signed-off-by: Michael Goldish <mgoldish@redhat.com>
KVM test: kvm_config.py: allow 'include' when parsing strings

Currently 'include' is only allowed when parsing a file.  This patch allows it
to be used when parsing a string as well.

Signed-off-by: Michael Goldish <mgoldish@redhat.com>
KVM test: kvm_config.py: remove unnecessary 'string' import

Signed-off-by: Michael Goldish <mgoldish@redhat.com>
KVM test: kvm_config.py: correct docstring of get_next_line()

Signed-off-by: Michael Goldish <mgoldish@redhat.com>
KVM test: kvm_config.py: support one-line conditional blocks

Support statements such as:

ide: only unattended_install

which is just a short form for

ide:
    only unattended_install

Currently the short form is supported only for assignment statements.
This patch allows it to be used for all types of statements.

Note: multiple filters can be combined on the same line, e.g.

ide: qcow2: Fedora: only unattended_install

is equivalent to:

ide..qcow2..Fedora: only unattended_install

Signed-off-by: Michael Goldish <mgoldish@redhat.com>
KVM test: kvm_config.py: process_content(): look for Op instead of str

Looking for str is a mistake because content should only contains Ops and
Filters.  This is a harmless bug but it should be fixed.

Signed-off-by: Michael Goldish <mgoldish@redhat.com>
KVM test: kvm_config.py: support negative conditional blocks

If the filter starting a conditional block is preceded by '!', the condition is
negative.  For example:

!Fedora.14, RHEL.6.0:
    only qcow2

means "for everything except Fedora.14 and RHEL.6.0, allow only qcow2".

Signed-off-by: Michael Goldish <mgoldish@redhat.com>