[KVM-AUTOTEST PATCH 1/3] KVM test: kvm_utils.py: add utility function which locates program files

2010-07-04 Thread Michael Goldish
this will result in /sbin not being included in $PATH. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index 0372565

[KVM-AUTOTEST PATCH 2/3] KVM test: use kvm_utils.find_command() where appropriate

2010-07-04 Thread Michael Goldish
Instead of hardcoding binary paths, use kvm_utils.find_command(). This should make the KVM test a little more distro independent. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py |4 ++-- client/tests/kvm/kvm_utils.py |7 --- 2

[KVM-AUTOTEST PATCH 3/3] KVM test: kvm_subprocess: allow garbage collection of kvm_tail instances

2010-07-04 Thread Michael Goldish
) Use kill_tail_threads() instead of VM.kill_tail_thread() (which was there for a different reason) in kvm_preprocessing.py. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py |5 +- client/tests/kvm/kvm_subprocess.py| 121

Re: [KVM-AUTOTEST PATCH] KVM test: Windows unattended_install: don't start the telnet service at startup

2010-06-29 Thread Michael Goldish
On 06/29/2010 04:33 AM, Chen Cao wrote: On Mon, Jun 28, 2010 at 05:54:18PM +0300, Michael Goldish wrote: The telnet service isn't used by kvm-autotest (AFAIK) and may interfere with rss.exe (port 23). Michael, I think it is better to leave the port 23 (and also 22) alone, people may

[KVM-AUTOTEST PATCH v3] [RFC] KVM test: add python client for rss file transfer services

2010-06-29 Thread Michael Goldish
Changes from v1: - Use glob() instead of iglob() (Python 2.4 doesn't like iglob()) - Change a few comments Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/rss_file_transfer.py | 436 + 1 files changed, 436 insertions(+), 0 deletions

[KVM-AUTOTEST PATCH v3] [RFC] KVM test: rss.cpp: add file transfer support

2010-06-29 Thread Michael Goldish
. - When text box is full, clear 3/4 of old text instead of 1/2 (looks prettier). - Use const char * instead of char * where appropriate. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/deps/rss.cpp | 1448 - 1 files changed, 989

[KVM-AUTOTEST PATCH v2] KVM test: enable file transfers for Windows guests

2010-06-29 Thread Michael Goldish
and 10023 instead of 22 and 23. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 20 +++- client/tests/kvm/tests_base.cfg.sample | 10 ++ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py

[KVM-AUTOTEST PATCH] KVM test: setuprss.bat: use 'netsh advfirewall' to disable firewall

2010-06-29 Thread Michael Goldish
).) Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/deps/setuprss.bat |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/deps/setuprss.bat b/client/tests/kvm/deps/setuprss.bat index 82d620d..1adff0f 100644 --- a/client/tests/kvm/deps

[KVM-AUTOTEST PATCH] KVM test: setuprss.bat: let rss.exe use its default ports

2010-06-29 Thread Michael Goldish
Don't tell rss.exe to use port 22. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/deps/setuprss.bat |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/deps/setuprss.bat b/client/tests/kvm/deps/setuprss.bat index 1adff0f..97298cd

[KVM-AUTOTEST PATCH] KVM test: kvm.py: add exception class name to failure message

2010-06-29 Thread Michael Goldish
This will result in more informative messages, e.g.: Test failed: FileTransferConnectError: Could not connect to server instead of Test failed: Could not connect to server Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm.py |3 ++- 1 files changed, 2 insertions

Re: [Autotest] [PATCH 1/2] KVM Test: Update cmd() help function in kvm_monitor.py to support parameters.

2010-06-28 Thread Michael Goldish
On 06/28/2010 10:45 AM, Feng Yang wrote: This function allow user send qmp command with parameters. e.g. balloon value=1073741824 Also log command to debug. Signed-off-by: Feng Yang fy...@redhat.com --- client/tests/kvm/kvm_monitor.py | 32 1 files

[KVM-AUTOTEST PATCH] KVM test: Windows unattended_install: don't start the telnet service at startup

2010-06-28 Thread Michael Goldish
The telnet service isn't used by kvm-autotest (AFAIK) and may interfere with rss.exe (port 23). Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/unattended/win2003-32.sif | 10 +++- client/tests/kvm/unattended/win2003-64.sif | 10 +++- .../kvm

[KVM-AUTOTEST PATCH v2] [RFC] KVM test: rss.cpp: add file transfer support

2010-06-27 Thread Michael Goldish
). - Use const char * instead of char * where appropriate. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/deps/rss.cpp | 1448 - 1 files changed, 989 insertions(+), 459 deletions(-) diff --git a/client/tests/kvm/deps/rss.cpp b

[KVM-AUTOTEST PATCH v2] [RFC] KVM test: add python client for rss file transfer services

2010-06-27 Thread Michael Goldish
See details in docstrings in rss_file_transfer.py. See protocol details in rss.cpp. Changes from v1: - Use glob() instead of iglob() (Python 2.4 doesn't like iglob()) - Change a few comments Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/rss_file_transfer.py | 412

[KVM-AUTOTEST PATCH] KVM test: kvm_vm.py: remove serial console file when VM is destroyed

2010-06-27 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index c5234c8..46b0aa3 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests

[KVM-AUTOTEST PATCH] KVM test: enable file transfers for Windows guests

2010-06-27 Thread Michael Goldish
This will only work with the most recent rss.exe. Usage examples: vm.copy_files_from(r'C:\foobar\*', test.debugdir, timeout=30) vm.copy_files_from(r'%SystemRoot%\memory.dmp', '/tmp/', timeout=60) vm.copy_files_to('/usr/local', r'C:\Windows', timeout=600) Signed-off-by: Michael Goldish mgold

Re: [PATCH 5/5] KVM test: Make it possible to run VMs without NICs

2010-06-25 Thread Michael Goldish
On 06/25/2010 02:33 AM, Lucas Meneghel Rodrigues wrote: For unittesting, for example, is interesting that we run the VM with the bare mininum number of parameters. This fix allows that. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/kvm_vm.py |5 +++-- 1

[KVM-AUTOTEST PATCH] [RFC] KVM test: rss.cpp: add file transfer support

2010-06-24 Thread Michael Goldish
Enable RSS to send/receive files and directory trees (recursively). See protocol details in rss.cpp. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/deps/rss.cpp | 1429 - 1 files changed, 970 insertions(+), 459 deletions(-) diff

[KVM-AUTOTEST PATCH] [RFC] KVM test: add python client for rss file transfer services

2010-06-24 Thread Michael Goldish
For usage details see docstrings in rss_file_transfer.py. For protocol details see deps/rss.cpp. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/rss_file_transfer.py | 412 + 1 files changed, 412 insertions(+), 0 deletions(-) create mode

Re: [KVM-AUTOTEST PATCH] [RFC] KVM test: rss.cpp: add file transfer support

2010-06-24 Thread Michael Goldish
On 06/24/2010 02:25 PM, Yaniv Kaul wrote: On 6/24/2010 2:03 PM, Michael Goldish wrote: Enable RSS to send/receive files and directory trees (recursively). Are you slowly developing a competitor to STAF (http://staf.sourceforge.net/) ? I think STAF offers much more stuff. However, rss

Re: [PATCH] KVM Test: Fix invalid literal bug in ioquit

2010-06-21 Thread Michael Goldish
On 06/21/2010 01:07 PM, Feng Yang wrote: Sometime check_cmd could not finish in setting time. Then o=, so int(o) will cause ValueError: invalid literal for int() with base 10: '' So change to check return status. Signed-off-by: Feng Yang fy...@redhat.com ---

[KVM-AUTOTEST PATCH] KVM test: kvm_preprocessing.py: test for vm.is_alive() instead of vm.is_dead()

2010-06-21 Thread Michael Goldish
vm.is_alive() verifies that the monitor is responsive, which is required for taking screendumps. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm

[KVM-AUTOTEST PATCH] KVM test: concentrate image and cdrom filename prefixes in tests.cfg.sample

2010-06-21 Thread Michael Goldish
Don't prefix image_name and cdrom at the end of tests_base.cfg.sample. Instead, do it all in tests.cfg.sample, to make it clearer to users editing the file. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/tests.cfg.sample | 10 -- client/tests/kvm

[KVM-AUTOTEST PATCH] KVM test: scan_results.py: fix handling of empty result list

2010-06-21 Thread Michael Goldish
If there are no test results, max() tries to operate on an empty sequence and throws an exception. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/scan_results.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/scan_results.py b

[KVM-AUTOTEST PATCH 01/18] KVM test: kvm_preprocessing.py: allow modifying VM params without restarting

2010-06-17 Thread Michael Goldish
that one test talks to the human monitor and the next test talks to the QMP monitor of the same VM. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm

[KVM-AUTOTEST PATCH 02/18] KVM test: kvm.py: suppress exceptions during postprocessing if the test fails

2010-06-17 Thread Michael Goldish
We don't want an exception during postprocessing to mask the exception that caused the failure. Also, move abort-on-error handling from kvm_preprocessing.py to kvm.py, and modify some debug messages. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm.py

[KVM-AUTOTEST PATCH 03/18] KVM test: kvm_monitor.py: add convenience method get_event()

2010-06-17 Thread Michael Goldish
get_event() looks for and returns a single event matching the given name, or None if none is found. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_monitor.py | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm

[KVM-AUTOTEST PATCH 07/18] KVM test: kvm_preprocessing.py: simplify pre/post_command error handling

2010-06-17 Thread Michael Goldish
Currently the error message appears twice: both in a logging.warn() statement and in an exception. Also the error.TestError raised adds unnecessary text to the exception message, which is informative enough as it is. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm

[KVM-AUTOTEST PATCH 09/18] KVM test: kvm_utils.py: add a primitive logging mechanism for kvm_subprocess

2010-06-17 Thread Michael Goldish
, such methods (called instancemethods) cannot be pickled, and kvm_subprocess relies on pickling. This patch offers an easy yet somewhat dirty solution to the problem. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py | 37

[KVM-AUTOTEST PATCH 11/18] KVM test: restructure remote_login() and remote_scp()

2010-06-17 Thread Michael Goldish
- Add _remote_login() and _remote_scp() which, instead of taking a command line, take an existing session and operate on it. This is useful for logging into existing always-open sessions, such as serial console sessions. - Merge ssh/telnet/netcat into remote_login(). Signed-off-by: Michael

[KVM-AUTOTEST PATCH 05/18] KVM test: check for RESET QMP events in the system_reset test

2010-06-17 Thread Michael Goldish
If the VM has QMP monitors and no such events are found, fail. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_test_utils.py | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_test_utils.py b/client/tests/kvm

[KVM-AUTOTEST PATCH 10/18] KVM test: add the auto_close option to all kvm_subprocess classes

2010-06-17 Thread Michael Goldish
Allow all kvm_subprocess classes (kvm_spawn, kvm_tail, kvm_expect, kvm_shell_session) to close automatically if auto_close is given and True. By default auto_close if False for all classes except kvm_shell_session, for which it is True by default. Signed-off-by: Michael Goldish mgold

[KVM-AUTOTEST PATCH 12/18] KVM test: send username in remote_login()

2010-06-17 Thread Michael Goldish
In order to let the serial console work, we must let the remote_login() send the username when met the username prompt. This patch fails the progress if if it met the username prompt twice. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael Goldish mgold...@redhat.com

[KVM-AUTOTEST PATCH 14/18] KVM test: kvm_vm.py: redirect the serial console to a unix socket

2010-06-17 Thread Michael Goldish
Based on Jason Wang's patch. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm

[KVM-AUTOTEST PATCH 17/18] KVM test: kvm_subprocess.py: don't sanitize text before passing it to callbacks

2010-06-17 Thread Michael Goldish
Converting the text to utf-8 seems to cause trouble when converting back (e.g. when writing to files). The logging system seems to be fine with unsanitized text, so let's not sanitize it. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_subprocess.py |6 ++ 1

[KVM-AUTOTEST PATCH 18/18] KVM test: log output of all shell sessions and SCP transfers

2010-06-17 Thread Michael Goldish
Use kvm_utils.log_line() to log the output of all shell sessions and SCP transfers. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py | 33 ++--- client/tests/kvm/kvm_vm.py| 15 --- 2 files changed, 38 insertions

Re: [Autotest] [KVM-AUTOTEST PATCH 13/14] KVM test: kvm_monitor.py: add QMP interface

2010-06-14 Thread Michael Goldish
On 06/14/2010 05:39 AM, Amos Kong wrote: On Sun, Jun 13, 2010 at 05:33:44PM +0300, Michael Goldish wrote: An initial QMP client implementation. Should be fully functional and supports asynchronous events. However, most tests must be modified to support it, because it returns output

[KVM-AUTOTEST PATCH v2 1/3] KVM test: add kvm_monitor.py, an interface to QEMU monitors

2010-06-14 Thread Michael Goldish
-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_monitor.py | 354 +++ 1 files changed, 354 insertions(+), 0 deletions(-) create mode 100644 client/tests/kvm/kvm_monitor.py diff --git a/client/tests/kvm/kvm_monitor.py b/client/tests/kvm

[KVM-AUTOTEST PATCH v2 2/3] KVM test: use new monitor interface

2010-06-14 Thread Michael Goldish
(the main monitor). - For now, ignore the parameter screendump_verbose because currently monitor commands are always silent (when successful). Changes from v1: - Turn VM.monitor into a property Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py

[KVM-AUTOTEST PATCH v2 3/3] KVM test: kvm_monitor.py: add QMP interface

2010-06-14 Thread Michael Goldish
_socket instead of socket Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_monitor.py | 305 +++ client/tests/kvm/kvm_vm.py |8 +- 2 files changed, 310 insertions(+), 3 deletions(-) diff --git a/client/tests/kvm/kvm_monitor.py b

[KVM-AUTOTEST PATCH 01/14] KVM test: tests_base.cfg.sample: remove inline comments

2010-06-13 Thread Michael Goldish
Inline comments are not supported (yet?) and break the parsing of tests_base.cfg.sample. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/tests_base.cfg.sample | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/client/tests/kvm

[KVM-AUTOTEST PATCH 02/14] KVM test: tests_base.cfg.sample: style modifications

2010-06-13 Thread Michael Goldish
Try to exclude tests as soon as possible. (Also remove broken linux_s3 exception at the same time.) Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/tests_base.cfg.sample | 22 ++ 1 files changed, 6 insertions(+), 16 deletions(-) diff --git a/client

[KVM-AUTOTEST PATCH 03/14] KVM test: kvm_utils.py: warn about exceptions raised during unpickling of env

2010-06-13 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index 0da7015..82ecb77 100644 --- a/client/tests/kvm/kvm_utils.py +++ b

[KVM-AUTOTEST PATCH 07/14] KVM test: kvm_vm.py: correct add_smp() mistake in make_qemu_command()

2010-06-13 Thread Michael Goldish
add_smp() is defined but not used. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index f65d967..039fbff 100755 --- a/client/tests

[KVM-AUTOTEST PATCH 04/14] KVM test: kvm_utils.py: remove unnecessary imports

2010-06-13 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index 82ecb77..0ea5a8a 100644 --- a/client/tests/kvm/kvm_utils.py +++ b

[KVM-AUTOTEST PATCH 09/14] KVM test: remove reference to _screendump_thread at postprocessing

2010-06-13 Thread Michael Goldish
allowing them to be garbage collected. This is mainly important for the new monitor classes. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b

[KVM-AUTOTEST PATCH 12/14] KVM test: use new monitor interface

2010-06-13 Thread Michael Goldish
(the main monitor). - For now, ignore the parameter screendump_verbose because currently monitor commands are always silent (when successful). Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py | 33 ++-- client/tests/kvm/kvm_test_utils.py

[KVM-AUTOTEST PATCH 14/14] KVM test: migration: support QMP

2010-06-13 Thread Michael Goldish
If the value returned from a monitor method call is a string, treat it as human monitor output. Otherwise treat it as QMP output. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_test_utils.py | 15 --- 1 files changed, 12 insertions(+), 3 deletions

[KVM-AUTOTEST PATCH 13/14] KVM test: kvm_monitor.py: add QMP interface

2010-06-13 Thread Michael Goldish
of returning a (status, output) tuple. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_monitor.py | 275 +++ client/tests/kvm/kvm_vm.py |6 +- 2 files changed, 279 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm

[KVM-AUTOTEST PATCH 11/14] KVM test: add kvm_monitor.py, an interface to QEMU monitors

2010-06-13 Thread Michael Goldish
). It currently contains only an interface to the human monitor. A QMP interface will be introduced in a future patch. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_monitor.py | 356 +++ 1 files changed, 356 insertions(+), 0 deletions

[KVM-AUTOTEST PATCH 08/14] KVM test: kvm_vm.py: use shell quoting in make_qemu_command() where appropriate

2010-06-13 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 36 ++-- 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 039fbff..e40abb4 100755 --- a/client/tests

Re: [KVM-AUTOTEST PATCH v2 1/4] KVM test: support -kernel and -append command line options

2010-06-09 Thread Michael Goldish
On 06/09/2010 03:03 PM, Avi Kivity wrote: On 06/09/2010 12:50 AM, Michael Goldish wrote: Signed-off-by: Michael Goldishmgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b

[KVM-AUTOTEST PATCH v2 1/4] KVM test: support -kernel and -append command line options

2010-06-08 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 94bacdf..f3c05f3 100755 --- a/client/tests/kvm/kvm_vm.py +++ b

[KVM-AUTOTEST PATCH v2 2/4] KVM test: add boolean 'testdev' VM parameter for RHEL-6 style unit tests

2010-06-08 Thread Michael Goldish
Should be set to yes to enable testdev. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 28 1 files changed, 20 insertions(+), 8 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index f3c05f3

[KVM-AUTOTEST PATCH v2 3/4] KVM test: add wrapper for RHEL-6 style unittests

2010-06-08 Thread Michael Goldish
Based on Naphtali Sprei's patches. Changes from v1: - Determine success/failure by exit status instead of output - Restructure loop so that vm.is_dead() is called less often - Copy test log to debugdir/unittest.log - Change parameters passed to wait_for() Signed-off-by: Michael Goldish mgold

[KVM-AUTOTEST PATCH v2 4/4] KVM test: add sample RHEL-6 style unittest config file

2010-06-08 Thread Michael Goldish
Based on Naphtali Sprei's patches. Changes from v1: - Remove reference_output parameter Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/unittests.cfg.sample | 83 + 1 files changed, 83 insertions(+), 0 deletions(-) create mode 100644

[KVM-AUTOTEST PATCH] KVM test: kvm_vm.py: don't require pci_assignable to be defined

2010-06-06 Thread Michael Goldish
Currently to disable PCI device assignment pci_assignable must be explicitly set to no. This patch allows it to remain undefined (and adds a warning message and a comment). Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 47

[KVM-AUTOTEST PATCH 1/4] KVM test: support -kernel and -append command line options

2010-06-03 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 94bacdf..f3c05f3 100755 --- a/client/tests/kvm/kvm_vm.py +++ b

[KVM-AUTOTEST PATCH 2/4] KVM test: add boolean 'testdev' VM parameter for RHEL-6 style unit tests

2010-06-03 Thread Michael Goldish
Should be set to yes to enable testdev. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 28 1 files changed, 20 insertions(+), 8 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index f3c05f3

[KVM-AUTOTEST PATCH 3/4] KVM test: add wrapper for RHEL-6 style unittests

2010-06-03 Thread Michael Goldish
Based on Naphtali Sprei's patches. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/tests/unittest.py | 66 1 files changed, 66 insertions(+), 0 deletions(-) create mode 100644 client/tests/kvm/tests/unittest.py diff --git a/client

[KVM-AUTOTEST PATCH 4/4] KVM test: add sample RHEL-6 style unittest config file

2010-06-03 Thread Michael Goldish
Based on Naphtali Sprei's patches. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/unittests.cfg.sample | 98 + 1 files changed, 98 insertions(+), 0 deletions(-) create mode 100644 client/tests/kvm/unittests.cfg.sample diff --git

Re: [Autotest] [v3 PATCH] KVM test: Add a helper to search the panic in the log

2010-05-26 Thread Michael Goldish
On 05/24/2010 10:38 AM, Jason Wang wrote: Michael Goldish wrote: On 05/19/2010 12:13 PM, Jason Wang wrote: This checker serves as the post_command to find the panic information in the file which contains the content of guest serial console. Changes from v2: - Put all things

Re: [Autotest][PATCH] KVM Test: Extend migration test to test unix, exec and migrate_cancel

2010-05-26 Thread Michael Goldish
On 05/26/2010 07:41 AM, Feng Yang wrote: Update migrate() in kvm_test_utils.py to support unix, exec protocol and migration cancel test. Add four migration sub test. There are tcp, unix, exec and mig_cancel. migrate_cancel only work in tcp protocol. Signed-off-by: Feng Yang fy...@redhat.com

Re: [Autotest] [PATCH] KVM Test: Make remote_scp() more robust.

2010-05-20 Thread Michael Goldish
On 05/19/2010 05:14 AM, Feng Yang wrote: - Michael Goldish mgold...@redhat.com wrote: From: Michael Goldish mgold...@redhat.com To: Feng Yang fy...@redhat.com Cc: autot...@test.kernel.org, kvm@vger.kernel.org Sent: Monday, May 17, 2010 11:05:37 PM GMT +08:00 Beijing / Chongqing / Hong

Re: [KVM-AUTOTEST PATCH] KVM test: use command line option wrapper functions

2010-05-20 Thread Michael Goldish
consumption. - Michael Goldish mgold...@redhat.com wrote: From: Michael Goldish mgold...@redhat.com To: autot...@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish mgold...@redhat.com Sent: Monday, May 17, 2010 9:29:35 PM GMT +08:00 Beijing / Chongqing / Hong Kong / Urumqi

Re: [Autotest] [v3 PATCH] KVM test: Add a helper to search the panic in the log

2010-05-20 Thread Michael Goldish
On 05/19/2010 12:13 PM, Jason Wang wrote: This checker serves as the post_command to find the panic information in the file which contains the content of guest serial console. Changes from v2: - Put all things into __main__ - Fix some typos Signed-off-by: Jason Wang jasow...@redhat.com

[KVM-AUTOTEST PATCH] KVM test: formatting improvements to scan_results.py

2010-05-17 Thread Michael Goldish
Print results clearly even if test names are very long. Also, for consistency, use the same quote character everywhere. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/scan_results.py | 49 ++--- 1 files changed, 29 insertions(+), 20

[KVM-AUTOTEST PATCH] KVM test: use command line option wrapper functions

2010-05-17 Thread Michael Goldish
In order to support multiple versions of qemu which use different command line options or syntaxes, wrap all command line options in small helper functions, which append text to the command line according to the output of 'qemu -help'. Signed-off-by: Michael Goldish mgold...@redhat.com

[KVM-AUTOTEST PATCH] KVM test: make use of tcpdump optional

2010-05-17 Thread Michael Goldish
To disable tcpdump, set 'run_tcpdump = no' in a config file. If 'run_tcpdump' isn't set at all, it defaults to 'yes'. (Currently TAP mode cannot be used without tcpdump.) Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py |2 +- client/tests/kvm

Re: [Autotest] [KVM-AUTOTEST PATCH] KVM test: make use of tcpdump optional

2010-05-17 Thread Michael Goldish
On 05/17/2010 04:35 PM, Lucas Meneghel Rodrigues wrote: On Mon, 2010-05-17 at 16:29 +0300, Michael Goldish wrote: To disable tcpdump, set 'run_tcpdump = no' in a config file. If 'run_tcpdump' isn't set at all, it defaults to 'yes'. (Currently TAP mode cannot be used without tcpdump.) Maybe

Re: [Autotest] [PATCH] KVM Test: Make remote_scp() more robust.

2010-05-17 Thread Michael Goldish
On 05/07/2010 01:26 PM, Feng Yang wrote: 1. In remote_scp(), if SCP connetion stalled for some reason, following code will be ran. else: # match == None logging.debug(Timeout elapsed or process terminated) status = sub.get_status() sub.close()

Re: [PATCH v2 10/10] KVM test: Add a helper to search the panic in the log

2010-05-12 Thread Michael Goldish
On 05/11/2010 12:04 PM, Jason Wang wrote: This checker serves as the post_command to find the panic information in the file which contains the content of guest serial console. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/scripts/check_serial.py | 41

Re: [Autotest] [PATCH 7/9] KVM test: Introduce the local_login()

2010-05-05 Thread Michael Goldish
On 04/29/2010 02:44 AM, Amos Kong wrote: On Wed, Apr 28, 2010 at 03:01:40PM +0300, Michael Goldish wrote: On 04/26/2010 01:04 PM, Jason Wang wrote: This patch introduces a new method which is used to log into the guest through the guest serial console. The serial_mode must be set to session

Re: [PATCH 3/9] KVM test: Make the login re suitable for serial console

2010-04-28 Thread Michael Goldish
On 04/26/2010 01:03 PM, Jason Wang wrote: Current matching re ^\s*[Ll]ogin:\s*$ is not suitable for the serial console, so change it to [Ll]ogin:. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/kvm_utils.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

Re: [PATCH 1/9] KVM test: Introduce the prompt assist

2010-04-28 Thread Michael Goldish
On 04/26/2010 01:03 PM, Jason Wang wrote: Sometimes we need to send an assist string to a session in order to get the prompt especially when re-connecting to an already logged serial session. This patch send the assist string before doing the pattern matching of remote_login. Can you give an

Re: [PATCH 2/9] KVM test: Add the ability to send the username in remote_login()

2010-04-28 Thread Michael Goldish
On 04/26/2010 01:03 PM, Jason Wang wrote: In order to let the serial console work, we must let the remote_login() send the username when needed. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/kvm_utils.py | 14 ++ 1 files changed, 10 insertions(+), 4

Re: [Autotest] [PATCH 8/9] KVM test: Create the background threads before calling process()

2010-04-28 Thread Michael Goldish
On 04/26/2010 01:04 PM, Jason Wang wrote: If the screendump and scrialdump threads are created after the process(), we may lose the progress tracking of guest shutting down. So this patch creates them before calling process() in preprocess. Signed-off-by: Jason Wang jasow...@redhat.com ---

Re: [PATCH 7/9] KVM test: Introduce the local_login()

2010-04-28 Thread Michael Goldish
On 04/26/2010 01:04 PM, Jason Wang wrote: This patch introduces a new method which is used to log into the guest through the guest serial console. The serial_mode must be set to session in order to make use of this patch. In what cases would we want to use this feature? The serial console is

Re: [PATCH] [RFC] KVM test: Create a remote session cleaning thread

2010-04-21 Thread Michael Goldish
On 04/17/2010 01:23 AM, Lucas Meneghel Rodrigues wrote: In some occasions even though a VM has terminated, some remote shell sessions will take a long time before giving up on the host. This situation is happening frequently on subtests such as autotest: The VM shuts down, but the session

Re: [PATCH] KVM test: Silence screendump thread by default

2010-04-20 Thread Michael Goldish
On 04/16/2010 09:12 PM, Lucas Meneghel Rodrigues wrote: The VM screendump thread recently introduced generates a lot of output on debug logs. Such output is not needed most of the time (we are interested to see if a screenshot production attempt failed though) and distracts the user from

Re: kvm autotest, how to disable address cache

2010-04-15 Thread Michael Goldish
On 04/08/2010 11:53 PM, Ryan Harper wrote: Is there any way to disable this? I'm running a guest on -net user networking, no interaction with the host network, yet, during the test, I get tons of: 15:50:48 DEBUG| (address cache) Adding cache entry: 00:1a:64:39:04:91 --- 10.0.253.16

Re: [PATCH 2/3] KVM Test: Add function run_autotest_background and wait_autotest_background.

2010-04-08 Thread Michael Goldish
On 04/07/2010 11:49 AM, Feng Yang wrote: Add function run_autotest_background and wait_autotest_background to kvm_test_utils.py. This two functions is used in ioquit test script. Signed-off-by: Feng Yang fy...@redhat.com --- client/tests/kvm/kvm_test_utils.py | 68

Re: [PATCH 3/3] KVM Test: Add ioquit test case

2010-04-08 Thread Michael Goldish
On 04/07/2010 11:49 AM, Feng Yang wrote: Signed-off-by: Feng Yang fy...@redhat.com --- client/tests/kvm/tests/ioquit.py | 54 client/tests/kvm/tests_base.cfg.sample |4 ++ 2 files changed, 58 insertions(+), 0 deletions(-) create mode 100644

Re: [PATCH 1/2] KVM test: Make the profiler could be configurated

2010-03-30 Thread Michael Goldish
- Jason Wang jasow...@redhat.com wrote: The patch let the profilers could be specified through configuration file. kvm_stat was kept as the default profiler. Looks good. Some minor style comments: Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/kvm_utils.py

[KVM-AUTOTEST PATCH] KVM test: kvm_vm: destroy VM if hugepage setup fails

2010-03-30 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 921414d..047505a 100755 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm

[KVM-AUTOTEST PATCH] KVM test: timedrift: open load sessions before taking initial time

2010-03-24 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/tests/timedrift.py | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/client/tests/kvm/tests/timedrift.py b/client/tests/kvm/tests/timedrift.py index 194f09c..9cb7489 100644

[KVM-AUTOTEST PATCH] KVM test: increase default timeout for autotest.sleeptest

2010-03-24 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/tests_base.cfg.sample |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample index 249f1b4..b8288fc 100644 --- a/client/tests

[KVM-AUTOTEST PATCH] KVM test: tests_base.cfg.sample: remove kill_vm_gracefully=no for system_powerdown

2010-03-24 Thread Michael Goldish
There's no good reason to set kill_vm_gracefully=no for system_powerdown. Furthermore, killing the VM ungracefully (with 'quit') can severely damage the filesystem (I witnessed that at least once). Therefore, revert to the default, which is kill_vm_gracefully=yes. Signed-off-by: Michael Goldish

[KVM-AUTOTEST PATCH v3] KVM test: take frequent screendumps during all tests

2010-03-23 Thread Michael Goldish
or terminating the screendump thread. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py | 98 ++-- client/tests/kvm/tests_base.cfg.sample | 13 +++- 2 files changed, 102 insertions(+), 9 deletions(-) diff --git a/client

[KVM-AUTOTEST PATCH 1/5] KVM test: remote_login(): if rss.exe says Please wait, wait

2010-03-23 Thread Michael Goldish
Recognize rss.exe's Please wait message and give the login procedure more time to complete. The message is sent before spawning cmd.exe, which may take some time under heavy load. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py |9 +++-- 1 files

[KVM-AUTOTEST PATCH 2/5] KVM test: tests_base.cfg.sample: add /f option to all Windows shutdown commands

2010-03-23 Thread Michael Goldish
It seems that when Windows is locked it refuses to shutdown unless given the /f option. - Add /f to all Windows shutdown and reboot commands. - Remove duplicate shutdown and reboot commands for Win2003, Win2008 and Win7. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm

[KVM-AUTOTEST PATCH 3/5] KVM test: timedrift: first open ssh/rss sessions with the guest, then start load

2010-03-23 Thread Michael Goldish
open all load sessions first, and then send the load command to all open sessions. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/tests/timedrift.py |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/tests/timedrift.py b/client

[KVM-AUTOTEST PATCH 4/5] KVM test: stress_boot: make boot timeout controllable

2010-03-23 Thread Michael Goldish
Use parameter 'boot_timeout'. Defaults to 240. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/tests/stress_boot.py |9 + client/tests/kvm/tests_base.cfg.sample |1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client/tests/kvm/tests

[KVM-AUTOTEST PATCH 5/5] KVM test: abort-on-error mode

2010-03-23 Thread Michael Goldish
(somewhere in tests_base.cfg). Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py | 13 + client/tests/kvm/tests.cfg.sample |5 + 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b

Re: [Autotest] [PATCH 4/4] KVM test: Enable timedrift for Linux guests

2010-03-22 Thread Michael Goldish
- Jason Wang jasow...@redhat.com wrote: We should also test timedrift for Linux guests especially for guest with pvclock. So this patch enable the timedrift for linux guests. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/tests_base.cfg.sample | 11 ++-

[KVM-AUTOTEST PATCH v2] KVM test: kvm_preprocessing.py: minor style corrections

2010-03-22 Thread Michael Goldish
, change 'for k in params.keys()' to 'for k in params' in process_command(). Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py | 58 +++- 1 files changed, 27 insertions(+), 31 deletions(-) diff --git a/client/tests/kvm

[KVM-AUTOTEST PATCH v2] KVM test: take frequent screendumps during all tests

2010-03-22 Thread Michael Goldish
place.) Changes from v1: Print debug messages when starting or terminating the screendump thread. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py | 87 +-- client/tests/kvm/tests_base.cfg.sample | 13 - 2 files

[KVM-AUTOTEST PATCH 1/5] KVM test: kvm_preprocessing.py: minor style corrections

2010-03-21 Thread Michael Goldish
Also, fetch the KVM version before setting up the VMs. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py | 58 +++- 1 files changed, 27 insertions(+), 31 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b

[KVM-AUTOTEST PATCH 2/5] KVM test: kvm.py: make sure all dump_env() calls are inside 'finally' blocks

2010-03-21 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm.py | 29 +++-- 1 files changed, 19 insertions(+), 10 deletions(-) diff --git a/client/tests/kvm/kvm.py b/client/tests/kvm/kvm.py index 9b8a10c..c6e146d 100644 --- a/client/tests/kvm/kvm.py +++ b

[KVM-AUTOTEST PATCH 4/5] KVM test: make kvm_stat usage optional

2010-03-21 Thread Michael Goldish
Relying on the test tag is not cool. Use a dedicated parameter instead. By default, all tests except build tests will use kvm_stat. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py |8 client/tests/kvm/tests_base.cfg.sample |3 +++ 2

<    1   2   3   4   5   6   7   >