[PATCH 04/19] KVM test: kvm_utils.py: add kill_process_tree()

2009-09-09 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index f046810..f686a53 100644 --- a/client/tests/kvm

[PATCH 07/19] KVM test: kvm_subprocess: get rid of get_pid() (replace it with get_shell_pid())

2009-09-09 Thread Michael Goldish
Don't differentiate between the PID of the subprocess and the PID of the shell running it. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_subprocess.py | 38 +-- client/tests/kvm/kvm_tests.py |2 +- 2 files changed, 7

[PATCH 09/19] KVM test: kvm_config.py: remove unused function get_match_block_indices()

2009-09-09 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_config.py | 27 --- 1 files changed, 0 insertions(+), 27 deletions(-) diff --git a/client/tests/kvm/kvm_config.py b/client/tests/kvm/kvm_config.py index da7988b..405de4b 100755 --- a/client

[PATCH 08/19] KVM test: remove unused function is_sshd_running()

2009-09-09 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py | 46 - client/tests/kvm/kvm_vm.py| 15 - 2 files changed, 0 insertions(+), 61 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests

[PATCH 06/19] KVM test: timedrift test: set CPU affinity recursively for all children

2009-09-09 Thread Michael Goldish
In addition to setting the CPU affinity of the given process, set it for all of its children too. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.py | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/tests/kvm/kvm_tests.py b

[PATCH 10/19] KVM test: boot test: add option to reboot using system_reset

2009-09-09 Thread Michael Goldish
system_reset, the VM is sent a system_reset monitor command, and the test waits until the guest comes back up. Before sending the system_reset command the test sleeps for a given duration. The duration is controlled by the parameter 'sleep_before_reset'. Signed-off-by: Michael Goldish mgold

[PATCH 11/19] KVM test: shutdown test: allow shutting down using system_powerdown

2009-09-09 Thread Michael Goldish
of time (controlled by the parameter sleep_before_powerdown) and then sends the system_powerdown monitor command. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.cfg.sample |8 client/tests/kvm/kvm_tests.py | 22 -- 2 files

[PATCH 12/19] KVM test: Add new module kvm_test_utils.py

2009-09-09 Thread Michael Goldish
. For example, a function should not be used where it may display misleading or inaccurate info or debug messages. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_test_utils.py | 61 1 files changed, 61 insertions(+), 0 deletions

[PATCH 13/19] KVM test: kvm_tests.py: save test code by using utilities in kvm_test_utils.py

2009-09-09 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.py | 148 - 1 files changed, 27 insertions(+), 121 deletions(-) diff --git a/client/tests/kvm/kvm_tests.py b/client/tests/kvm/kvm_tests.py index 863b863..35666cf 100644

[PATCH 14/19] KVM test: kvm_preprocessing.py: don't explicitly print failure messages

2009-09-09 Thread Michael Goldish
This is taken care of elsewhere, so currently when something fails during pre/post-processing, messages get logged twice. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py | 14 -- 1 files changed, 4 insertions(+), 10 deletions(-) diff

[PATCH 16/19] KVM test: kvm_subprocess: robustify the test for child process termination

2009-09-09 Thread Michael Goldish
Don't rely on os.read() raising an exception; use waitpid() to check for child termination: - every 0.5 seconds, or - when os.read() raises an exception, or - when os.read() returns a zero-length string. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_subprocess.py

[PATCH 15/19] KVM test: Autotest test wrapper cleanup

2009-09-09 Thread Michael Goldish
Make the code shorter and simpler. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.py | 153 +++-- 1 files changed, 72 insertions(+), 81 deletions(-) diff --git a/client/tests/kvm/kvm_tests.py b/client/tests/kvm/kvm_tests.py

[PATCH 17/19] KVM test: kvm_vm.py: add macaddr= to command line only if a MAC address is given

2009-09-09 Thread Michael Goldish
(Avoid adding weird things like 'macaddr=None' to the command line.) 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 d360d8e

[PATCH 18/19] KVM test: kvm_tests.cfg.sample: get all Windows test utilities from a single ISO

2009-09-09 Thread Michael Goldish
' tests still use the usual ISO files. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.cfg.sample | 18 +- 1 files changed, 5 insertions(+), 13 deletions(-) diff --git a/client/tests/kvm/kvm_tests.cfg.sample b/client/tests/kvm/kvm_tests.cfg.sample

[PATCH 19/19] KVM test: kvm_preprocessing.py: verify PPM file validity before passing to PIL

2009-09-09 Thread Michael Goldish
Passing PIL an invalid PPM file makes it throw an IOError. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm

Re: [Autotest] [KVM-AUTOTEST PATCH 0/7] KVM test: support for the new remote shell server for Windows

2009-08-18 Thread Michael Goldish
- Lucas Meneghel Rodrigues l...@redhat.com wrote: Ok, very good, similarly to the previous patchset, I rebased one of the patches and applied the set, I am making tests with an rss binary generated by the cross compiler. I am testing with Winxp 32 bit, so far so good and rss.exe works

Re: [Autotest] [KVM-AUTOTEST PATCH 0/7] KVM test: support for the new remote shell server for Windows

2009-08-18 Thread Michael Goldish
- Lucas Meneghel Rodrigues l...@redhat.com wrote: On Tue, Aug 18, 2009 at 7:15 AM, Michael Goldishmgold...@redhat.com wrote: - Lucas Meneghel Rodrigues l...@redhat.com wrote: Ok, very good, similarly to the previous patchset, I rebased one of the patches and applied the set,

Re: [KVM-AUTOTEST PATCH v2 3/3] KVM test: add AutoIt test to kvm_tests.cfg.sample

2009-08-12 Thread Michael Goldish
- Chen Cao k...@redhat.com wrote: On Tue, Aug 11, 2009 at 03:10:44PM +0300, Michael Goldish wrote: Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.cfg.sample | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git

Re: [PATCH KVM-AUTOTEST 2/2] Convert images to JPEG using PIL instead of an external program

2009-08-12 Thread Michael Goldish
- Avi Kivity a...@redhat.com wrote: This is faster since we don't need to fork/exec/wait for an external program each time. Signed-off-by: Avi Kivity a...@redhat.com --- client/tests/kvm/kvm_guest_wizard.py |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff

[KVM-AUTOTEST PATCH v2 01/11] KVM test: add some MAC/IP address utilities to kvm_utils

2009-08-12 Thread Michael Goldish
-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py | 106 + 1 files changed, 106 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index e897e78..4891592 100644 --- a/client/tests

[KVM-AUTOTEST PATCH v2 02/11] KVM test: add basic TAP support with static MAC-IP mapping

2009-08-12 Thread Michael Goldish
. 'script_dir' should normally be the directory 'scripts' under the main KVM test directory. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py |8 ++- client/tests/kvm/kvm_tests.cfg.sample |6 ++ client/tests/kvm/kvm_vm.py| 95

[KVM-AUTOTEST PATCH v2 03/11] KVM test: add sample 'qemu-ifup' script

2009-08-12 Thread Michael Goldish
be done inside 'qemu-ifup' as well, but this sample script doesn't do it. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/scripts/qemu-ifup |8 1 files changed, 8 insertions(+), 0 deletions(-) create mode 100755 client/tests/kvm/scripts/qemu-ifup diff --git

[KVM-AUTOTEST PATCH v2 04/11] KVM test: add host-specific MAC-IP pool configuration

2009-08-12 Thread Michael Goldish
, use 'default_host'. - While we're at it, add a comment informing the user where to modify the test configration, if that is desirable - (Also add a missing space somewhere in the control file, and remove a few extra ones) Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm

[KVM-AUTOTEST PATCH v2 05/11] KVM test: specify installation cdkeys in a dedicated file

2009-08-12 Thread Michael Goldish
'). Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_cdkeys.cfg.sample | 16 client/tests/kvm/kvm_tests.cfg.sample | 10 +++--- 2 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 client/tests/kvm/kvm_cdkeys.cfg.sample diff --git

[KVM-AUTOTEST PATCH v2 06/11] KVM test: kvm_config.py: do not fail when including a nonexistent file

2009-08-12 Thread Michael Goldish
Instead of failing, just print a warning. Included files may not always be crucial for tests to run (kvm_cdkeys.cfg for example). Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_config.py | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions

[KVM-AUTOTEST PATCH v2 07/11] KVM test: kvm_subprocess: send user specified parameters to kvm_tail callbacks

2009-08-12 Thread Michael Goldish
parameters. This is mainly meant to bypass Python's refusal to pickle instance methods. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_subprocess.py | 60 +++ 1 files changed, 53 insertions(+), 7 deletions(-) diff --git a/client/tests/kvm

[KVM-AUTOTEST PATCH v2 08/11] KVM test: dynamically detect and cache MAC-IP pairs using tcpdump

2009-08-12 Thread Michael Goldish
Run tcpdump in the background at all times and listen for DHCP communication. Whenever a DHCP server assigns an IP address to a MAC address, cache it for future reference. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py | 41

[KVM-AUTOTEST PATCH v2 09/11] KVM test: kvm_utils.py: small fix for format_str_for_message()

2009-08-12 Thread Michael Goldish
format_str_for_message() sometimes adds an extra newline. Fix that. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py

[KVM-AUTOTEST PATCH v2 11/11] KVM test: make stress_boot work properly with TAP networking

2009-08-12 Thread Michael Goldish
command 'ps aux' with 'uname -a'. The silly reason for this is that DSL-4.2.5 doesn't like 'ps aux'. Since 'uname -a' is just as good (AFAIK), use it instead. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.cfg.sample |7 ++- client/tests/kvm/kvm_tests.py

[KVM-AUTOTEST PATCH v2 10/11] KVM test: make VMs use a dynamic MAC-IP mapping generated by tcpdump

2009-08-12 Thread Michael Goldish
are provided by the user, specify 'always_use_tcpdump = yes'. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_address_pools.cfg.sample |8 +++ client/tests/kvm/kvm_preprocessing.py |3 +- client/tests/kvm/kvm_utils.py | 37

[KVM-AUTOTEST PATCH v2] KVM test: treat all user specified paths equally

2009-08-12 Thread Michael Goldish
filenames should begin with 'steps/'. This patch modifies kvm_vm.py, kvm_preprocessing.py, kvm_guest_wizard.py, stepmaker.py and and kvm_tests.cfg.sample. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_guest_wizard.py |2 +- client/tests/kvm/kvm_preprocessing.py

Re: [Autotest] [KVM-AUTOTEST PATCH 11/12] KVM test: make VMs use a dynamic MAC-IP mapping generated by tcpdump

2009-08-12 Thread Michael Goldish
- Jason Wang jasow...@redhat.com wrote: On Tue, Aug 11, 2009 at 1:16 PM, Michael Goldishmgold...@redhat.com wrote: - Jason Wang jasow...@redhat.com wrote: Hello Michael: Based on our experiences with TAP networking scripts, the verify_mac_ip_pair() could not work

[KVM-AUTOTEST PATCH v2 0/3] KVM test: corrections to the AutoIt patchset

2009-08-11 Thread Michael Goldish
This is the AutoIt patch set with some minor corrections: - Use read_up_to_prompt() instead of read_nonblocking() before running the AutoIt command - autoit_script_params defaults to in the test code as well - Indentation fix in notepad1.au3 -- To unsubscribe from this list: send the line

[KVM-AUTOTEST PATCH v2 2/3] KVM test: add sample AutoIt script

2009-08-11 Thread Michael Goldish
Add a sample autoit script under autoit/. The script is a modified version of the notepad1.au3 example script that ships with AutoIt. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/autoit/notepad1.au3 | 44 ++ 1 files changed, 44

[KVM-AUTOTEST PATCH v2 1/3] KVM test: add AutoIt test

2009-08-11 Thread Michael Goldish
parameters to send to the script. autoit_script_timeout: The time duration (in seconds) to wait for the script to exit. The test code can be extended later to add more features. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm.py |1 + client/tests/kvm

[KVM-AUTOTEST PATCH v2 3/3] KVM test: add AutoIt test to kvm_tests.cfg.sample

2009-08-11 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.cfg.sample | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_tests.cfg.sample b/client/tests/kvm/kvm_tests.cfg.sample index 12e907b..05a1ca7 100644

[KVM-AUTOTEST PATCH] KVM test: kvm_subprocess: add function kill_tail_thread()

2009-08-11 Thread Michael Goldish
explicitly. This patch also makes the postprocessor call the function for all VMs. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py |4 client/tests/kvm/kvm_subprocess.py| 12 client/tests/kvm/kvm_vm.py|8 3

[KVM-AUTOTEST PATCH] KVM test: kvm_tests.cfg.sample: improve shell_prompt regular expressions

2009-08-11 Thread Michael Goldish
Require that shell prompts start at the beginning of the line (^) and be followed by nothing more than whitespace (\s*$). Also remove the length limitation from Windows prompts, and do not restrict them to C:\. Also do not require RHEL and Fedora prompts to contain 'root@'. Signed-off-by: Michael

Re: [Autotest] [KVM-AUTOTEST PATCH v2 1/3] KVM test: add AutoIt test

2009-08-11 Thread Michael Goldish
- Yolkfull Chow yz...@redhat.com wrote: On Tue, Aug 11, 2009 at 03:10:42PM +0300, Michael Goldish wrote: Currently the test only logs in, runs a given script and fails if the script takes too long to exit or if its exit status is nonzero. The test expects these parameters

Re: [KVM-AUTOTEST PATCH 11/12] KVM test: make VMs use a dynamic MAC-IP mapping generated by tcpdump

2009-08-11 Thread Michael Goldish
that IP addresses be taken from the dynamic cache. To force the system to obtain IP addresses from the dynamic cache even when static base addresses are provided by the user, specify 'always_use_tcpdump = yes'. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm

Re: KVM autotest TAP patchset

2009-08-11 Thread Michael Goldish
- look...@gmail.com wrote: Reviewers: lmr, Message: Michael, the patchset looks mostly good to me, congrats! I have a few comments to make. I believe it's enough to make you send me a full updated set with 9 patches: 1,2,3,4,5,8,9,11,12. 3 of them were already applied. After

Re: [Autotest] [PATCH] KVM test: Make kvm_config.py to use autotest logging

2009-08-09 Thread Michael Goldish
- Lucas Meneghel Rodrigues look...@gmail.com wrote: On Sat, Aug 8, 2009 at 3:32 PM, Michael Goldishmgold...@redhat.com wrote: How can we set the verbosity level for stand-alone execution, e.g. enable/disable debug output when running ./kvm_config.py kvm_tests.cfg? On the main

[KVM-AUTOTEST PATCH 0/6] KVM test: configuration interface changes

2009-08-09 Thread Michael Goldish
This patch set modifies the names and functionality of several config parameters and adds new ones. It also adds support for Netcat as a remote shell client. It breaks compatibility with existing test configurations. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of

[KVM-AUTOTEST PATCH 2/6] KVM test: support Netcat as a remote shell client

2009-08-09 Thread Michael Goldish
This is useful for Windows guests that will use the homemade remote shell server. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py | 17 + client/tests/kvm/kvm_vm.py|3 +++ 2 files changed, 20 insertions(+), 0 deletions(-) diff

[KVM-AUTOTEST PATCH 1/6] KVM test: rename SSH related parameters and functions and add new ones

2009-08-09 Thread Michael Goldish
- shutdown_command cmd_reboot - reboot_command Also, new parameters were added: shell_client (ssh, telnet or nc) file_transfer_client (currently only scp) file_transfer_port The parameter use_telnet was removed, as well as the function VM.ssh(). Signed-off-by: Michael Goldish mgold...@redhat.com --- client

[KVM-AUTOTEST PATCH 3/6] KVM test: add a function that translates user specified paths to real ones

2009-08-09 Thread Michael Goldish
If a user specified path is an absolute one, it is returned as is. If it's relative, it's appended to a certain base path. This function is meant to allow framework and test code to treat all user specified paths equally. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm

[KVM-AUTOTEST PATCH 5/6] KVM test: treat all user specified paths equally

2009-08-09 Thread Michael Goldish
filenames should begin with 'steps/'. This patch modifies kvm_vm.py, kvm_preprocessing.py, kvm_guest_wizard.py, stepmaker.py and and kvm_tests.cfg.sample. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_guest_wizard.py |2 +- client/tests/kvm/kvm_preprocessing.py

[KVM-AUTOTEST PATCH 6/6] KVM test: allow the user to specify the paths of the qemu and qemu-img binaries

2009-08-09 Thread Michael Goldish
-installed qemu and qemu-img that reside somewhere outside the Autotest dir, e.g. in /usr/bin. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py | 18 +++--- client/tests/kvm/kvm_tests.cfg.sample |2 ++ client/tests/kvm/kvm_vm.py

[KVM-AUTOTEST PATCH] KVM test: kvm_subprocess: make is_alive() much shorter

2009-08-09 Thread Michael Goldish
Use a much shorter and simpler is_alive() instead of the current one. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_subprocess.py | 25 + 1 files changed, 1 insertions(+), 24 deletions(-) diff --git a/client/tests/kvm/kvm_subprocess.py b

[KVM-AUTOTEST PATCH 0/7] KVM test: support for the new remote shell server for Windows

2009-08-09 Thread Michael Goldish
This patch set adds the source code of rss.exe as well as a batch file that prepares Windows guests for remote access (using rss.exe). It adds 3 files under deps/ dir: rss.cpp, setuprss.bat and rss.reg. The latter is required for Windows 2000 which seems to lack the reg command. This set also

[KVM-AUTOTEST PATCH 1/7] KVM test: Simple remote shell server for use with Windows guests

2009-08-09 Thread Michael Goldish
This server provides clients with an interactive cmd.exe shell. It uses no encryption or authentication. Usage: rss.exe [port] The default port is 22. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/deps/rss.cpp | 467 + 1 files

[KVM-AUTOTEST PATCH 2/7] KVM test: Batch script that prepares a Windows guest for remote access

2009-08-09 Thread Michael Goldish
to executable] e.g.: setuptrss.bat D:\rss.exe If used without parameters, rss.exe will be copied from the directory in which setuprss.bat resides. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/deps/rss.reg | 15 +++ client/tests/kvm/deps/setuprss.bat | 19

[KVM-AUTOTEST PATCH 3/7] KVM test: Step files to setup the new remote shell server on Windows guests

2009-08-09 Thread Michael Goldish
-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/steps/Win2000-32-rss.steps | 52 + client/tests/kvm/steps/Win2003-32-rss.steps | 49 +++ client/tests/kvm/steps/Win2003-64-rss.steps | 47 ++ client/tests/kvm

[KVM-AUTOTEST PATCH 4/7] KVM test: step file tests: do not fail when receiving an invalid screendump

2009-08-09 Thread Michael Goldish
Warn, instead of failing, when receiving an invalid PPM screendump. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_guest_wizard.py | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/client/tests/kvm/kvm_guest_wizard.py b/client/tests

[KVM-AUTOTEST PATCH 5/7] KVM test: stepmaker.py: Do not attempt to use undefined variable 'version'

2009-08-09 Thread Michael Goldish
The version variable is used even though it is no longer defined. This patch fixes this. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/stepmaker.py |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/client/tests/kvm/stepmaker.py b/client/tests

[KVM-AUTOTEST PATCH 6/7] KVM test: shutdown test: do not close session immediately after shutdown command

2009-08-09 Thread Michael Goldish
If the session is closed immediately after a command is sent, the command may not be executed. To overcome this, first wait for the guest to shut down, and then close the session. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.py | 18 ++ 1

[KVM-AUTOTEST PATCH 7/7] KVM test: use homemade remote shell server (rss.exe) for all Windows guests

2009-08-09 Thread Michael Goldish
. Currently WinVista.32, WinVista.64, Win2008.64, Win2003.64 and WinXP.64 can run only the install test. This patch makes them run all available tests, like the other Windows guests. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.cfg.sample | 70

[KVM-AUTOTEST PATCH 2/3] KVM test: add sample AutoIt script

2009-08-09 Thread Michael Goldish
Add a sample autoit script under autoit/. The script is a modified version of the notepad1.au3 example script that ships with AutoIt. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/autoit/notepad1.au3 | 44 ++ 1 files changed, 44

[KVM-AUTOTEST PATCH 3/3] KVM test: add AutoIt test to kvm_tests.cfg.sample

2009-08-09 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.cfg.sample | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_tests.cfg.sample b/client/tests/kvm/kvm_tests.cfg.sample index 12e907b..05a1ca7 100644

[KVM-AUTOTEST PATCH 1/3] KVM test: add AutoIt test

2009-08-09 Thread Michael Goldish
parameters to send to the script. autoit_script_timeout: The time duration (in seconds) to wait for the script to exit. The test code can be extended later to add more features. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm.py |1 + client/tests/kvm

Re: [PATCH] KVM test: Make kvm_config.py to use autotest logging

2009-08-08 Thread Michael Goldish
How can we set the verbosity level for stand-alone execution, e.g. enable/disable debug output when running ./kvm_config.py kvm_tests.cfg? - Original Message - From: Lucas Meneghel Rodrigues l...@redhat.com To: autot...@test.kernel.org Cc: kvm@vger.kernel.org, mgold...@redhat.com, Lucas

[KVM-AUTOTEST PATCH CORRECTION] KVM test: timedrift: Use helper functions to make the code more readable

2009-08-07 Thread Michael Goldish
thread. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.py | 77 + 1 files changed, 55 insertions(+), 22 deletions(-) diff --git a/client/tests/kvm/kvm_tests.py b/client/tests/kvm/kvm_tests.py index 308db97..259555e 100644

Re: [Autotest] [KVM-AUTOTEST PATCH 1/2] KVM test: timedrift: Use helper functions to make the code more readable

2009-08-07 Thread Michael Goldish
times. 2. Use helper functions that set and restore the CPU affinity of a process. 3. In these helper functions, set the affinity of all threads of the process,   not just the main thread. Signed-off-by: Michael Goldish mgold...@redhat.com ---  client/tests/kvm/kvm_tests.py |   68

Re: [Autotest] [KVM-AUTOTEST PATCH 07/12] KVM test: kvm_config.py: do not fail when including a nonexistent file

2009-08-07 Thread Michael Goldish
- Lucas Meneghel Rodrigues l...@redhat.com wrote: On Sun, Aug 2, 2009 at 8:58 PM, Michael Goldishmgold...@redhat.com wrote: Instead of failing, just print a warning.  Included files may not always be crucial for tests to run (kvm_cdkeys.cfg for example). Signed-off-by: Michael

[KVM-AUTOTEST PATCH] KVM test: timedrift: pass parameters to the get_time() helper function

2009-08-07 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.py | 17 + 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/client/tests/kvm/kvm_tests.py b/client/tests/kvm/kvm_tests.py index 8cc89f1..e678039 100644 --- a/client/tests/kvm

[KVM-AUTOTEST PATCH CORRECTION] KVM test: kvm_subprocess: send user specified parameters to kvm_tail callbacks

2009-08-07 Thread Michael Goldish
parameters. This is mainly meant to bypass Python's refusal to pickle instance methods. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_subprocess.py | 60 +++ 1 files changed, 53 insertions(+), 7 deletions(-) diff --git a/client/tests/kvm

Re: [autotest] vm creation fails (not)

2009-08-06 Thread Michael Goldish
- Avi Kivity a...@redhat.com wrote: On 08/05/2009 09:47 PM, Michael Goldish wrote: I can find out if the parent process is alive by checking a lock file. A little while ago I couldn't afford to do that in is_alive() because it would cause a deadlock, but now this shouldn't

[KVM-AUTOTEST PATCH CORRECTIONS] Corrections to the TAP patchset

2009-08-06 Thread Michael Goldish
I found two mistakes (so far) in the TAP patchset: - Two import lines in kvm_utils.py were commented out (for personal testing) and I forgot to uncomment them before committing, and this breaks kvm_install - qemu-ifup should be executable, but isn't The following patches (1, 3, 11) replace the

[KVM-AUTOTEST PATCH 01/12] KVM test: add some MAC/IP address utilities to kvm_utils

2009-08-06 Thread Michael Goldish
-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py | 106 + 1 files changed, 106 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index e897e78..4891592 100644 --- a/client/tests

[KVM-AUTOTEST PATCH 03/12] KVM test: add sample 'qemu-ifup' script

2009-08-06 Thread Michael Goldish
be done inside 'qemu-ifup' as well, but this sample script doesn't do it. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/qemu-ifup |8 1 files changed, 8 insertions(+), 0 deletions(-) create mode 100755 client/tests/kvm/qemu-ifup diff --git a/client/tests/kvm

[KVM-AUTOTEST PATCH 11/12] KVM test: make VMs use a dynamic MAC-IP mapping generated by tcpdump

2009-08-06 Thread Michael Goldish
are provided by the user, specify 'always_use_tcpdump = yes'. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_address_pools.cfg.sample |8 +++ client/tests/kvm/kvm_preprocessing.py |3 +- client/tests/kvm/kvm_utils.py | 28 +++- client

Re: [autotest] require root?

2009-08-05 Thread Michael Goldish
I used to run the KVM test as a user all the time until I started working with TAP networking. TAP requires running qemu as root, unless you create the TAP devices manually and set proper permissions for them. - Gerd Hoffmann kra...@redhat.com wrote: Hi, What is the point in requiring

Re: [autotest] vm creation fails (not)

2009-08-05 Thread Michael Goldish
- Gerd Hoffmann kra...@redhat.com wrote: Hi, Now and then autotest thinks creating the vm failed, although qemu started up just fine. autotest then goes to wait($qemupid) and hangs there forever ... If you encounter this again, please send the autotest debug log -- it'll make it

[KVM-AUTOTEST PATCH 1/2] KVM test: timedrift: Use helper functions to make the code more readable

2009-08-05 Thread Michael Goldish
thread. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.py | 68 +++- 1 files changed, 46 insertions(+), 22 deletions(-) diff --git a/client/tests/kvm/kvm_tests.py b/client/tests/kvm/kvm_tests.py index 308db97..67cf713 100644

[KVM-AUTOTEST PATCH 2/2] KVM test: timedrift test: close shell session before failing the test

2009-08-05 Thread Michael Goldish
Currently the shell session is sometimes not closed because the error.TestFail exception is raised before the session has a chance to close. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.py |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff

Re: [Autotest] [KVM-AUTOTEST PATCH 03/12] KVM test: add sample 'qemu-ifup' script

2009-08-05 Thread Michael Goldish
that is appropriate for the host OS.  It can be done inside 'qemu-ifup' as well, but this sample script doesn't do it. Signed-off-by: Michael Goldish mgold...@redhat.com ---  client/tests/kvm/qemu-ifup |    8  1 files changed, 8 insertions(+), 0 deletions(-)  create mode

Re: [autotest] vm creation fails (not)

2009-08-05 Thread Michael Goldish
- Gerd Hoffmann kra...@redhat.com wrote: On 08/05/09 12:16, Michael Goldish wrote: - Gerd Hoffmannkra...@redhat.com wrote: Hi, Now and then autotest thinks creating the vm failed, although qemu started up just fine. autotest then goes to wait($qemupid) and hangs

Re: [Autotest] [KVM-AUTOTEST PATCH 05/12] KVM test: specify installation cdkeys in a dedicated file

2009-08-05 Thread Michael Goldish
need more time to review it? The ability to modify the configuration in the control file isn't very relevant to the cdkeys because we probably don't want to specify cdkeys in the control file. Signed-off-by: Michael Goldish mgold...@redhat.com ---  client/tests/kvm/kvm_cdkeys.cfg.sample

Re: [autotest] vm creation fails (not)

2009-08-05 Thread Michael Goldish
Message - From: Gerd Hoffmann kra...@redhat.com To: Michael Goldish mgold...@redhat.com Cc: KVM list kvm@vger.kernel.org Sent: Wednesday, August 5, 2009 4:21:54 PM (GMT+0200) Auto-Detected Subject: Re: [autotest] vm creation fails (not) On 08/05/09 15:12, Michael Goldish wrote: Thanks! I think I

[KVM-AUTOTEST PATCH 1/1] KVM test: kvm_subprocess: don't immediately check /proc/$PID/cmdline

2009-08-05 Thread Michael Goldish
has been pickled and unpickled. In both cases, there is more than enough time for /proc/$PID/cmdline to get updated. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_subprocess.py |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/client/tests

Re: [autotest] vm creation fails (not)

2009-08-05 Thread Michael Goldish
- Gerd Hoffmann kra...@redhat.com wrote: On 08/05/09 16:05, Michael Goldish wrote: Thanks, I managed to reproduce it and I'll send a patch to fix it soon. The reason for autotest thinking qemu wasn't alive was that apparently it takes time for /proc/$PID/cmdline to reflect the real

Re: [autotest] vm creation fails (not)

2009-08-05 Thread Michael Goldish
- Avi Kivity a...@redhat.com wrote: On 08/05/2009 05:05 PM, Michael Goldish wrote: Thanks, I managed to reproduce it and I'll send a patch to fix it soon. The reason for autotest thinking qemu wasn't alive was that apparently it takes time for /proc/$PID/cmdline to reflect the real

Re: [autotest] vm creation fails (not)

2009-08-05 Thread Michael Goldish
- Avi Kivity a...@redhat.com wrote: On 08/05/2009 06:48 PM, Michael Goldish wrote: You should use wait() to find out if the process is alive, not tricks with the PID and process name, which are racy as you found out. I'm not sure I can do that because the process

Re: [KVM-AUTOTEST PATCH 0/12] TAP support (and a few other small things)

2009-08-04 Thread Michael Goldish
- Dor Laor dl...@redhat.com wrote: On 08/03/2009 04:51 PM, Michael Goldish wrote: - Dor Laordl...@redhat.com wrote: On 08/03/2009 12:39 PM, Michael Goldish wrote: - Dor Laordl...@redhat.com wrote: tcpOn 08/03/2009 02:58 AM, Michael Goldish wrote: Here's my proposed

Re: [AUTOTEST]telnet login fails in win2k8 DC 64. here are debug and other info

2009-08-04 Thread Michael Goldish
'print COMMAND: + command' at the top of the function, and that might help us figure out what's wrong. - Original Message - From: sudhir kumar smalik...@gmail.com To: Michael Goldish mgold...@redhat.com Cc: Lucas Meneghel Rodrigues mrodr...@redhat.com, Ryan Harper ry...@us.ibm.com, kvm-devel

Re: [AUTOTEST]telnet login fails in win2k8 DC 64. here are debug and other info

2009-08-04 Thread Michael Goldish
is OK, maybe the port isn't, and in the logs we don't see what port ssh_login() is actually trying to connect to. - Original Message - From: sudhir kumar smalik...@gmail.com To: Michael Goldish mgold...@redhat.com Cc: Lucas Meneghel Rodrigues mrodr...@redhat.com, Ryan

Re: [KVM-AUTOTEST PATCH 12/12] KVM test: make stress_boot work properly with TAP networking

2009-08-03 Thread Michael Goldish
- Yolkfull Chow yz...@redhat.com wrote: Hi Michael, I just have some comments on what you changed on stress_boot. :-) On Mon, Aug 03, 2009 at 02:58:21AM +0300, Michael Goldish wrote: Take an additional parameter 'clone_address_index_base' which indicates the initial value

Re: [KVM-AUTOTEST PATCH 12/12] KVM test: make stress_boot work properly with TAP networking

2009-08-03 Thread Michael Goldish
- Yolkfull Chow yz...@redhat.com wrote: On Mon, Aug 03, 2009 at 02:45:23AM -0400, Michael Goldish wrote: - Yolkfull Chow yz...@redhat.com wrote: Hi Michael, I just have some comments on what you changed on stress_boot. :-) On Mon, Aug 03, 2009 at 02:58:21AM

Re: [KVM-AUTOTEST PATCH 0/12] TAP support (and a few other small things)

2009-08-03 Thread Michael Goldish
- Dor Laor dl...@redhat.com wrote: tcpOn 08/03/2009 02:58 AM, Michael Goldish wrote: Here's my proposed TAP solution: - The user specifies MAC ranges and may or may not specify corresponding IP ranges. - VMs are always given MAC addresses from the user specified MAC ranges

Re: [KVM-AUTOTEST PATCH 0/12] TAP support (and a few other small things)

2009-08-03 Thread Michael Goldish
- Dor Laor dl...@redhat.com wrote: On 08/03/2009 12:39 PM, Michael Goldish wrote: - Dor Laordl...@redhat.com wrote: tcpOn 08/03/2009 02:58 AM, Michael Goldish wrote: Here's my proposed TAP solution: - The user specifies MAC ranges and may or may not specify corresponding IP

Re: KVM test: Unattended install support

2009-08-03 Thread Michael Goldish
make TAP the default mode). I would like to thank Yaniv Kaul, Michael Goldish, Eduardo Habkost for the ideas and help to resolve some nitty-gritty issues and for David Huff, who sent an initial implementation of this test. -- To unsubscribe from this list: send the line unsubscribe kvm

Re: [PATCH 6/6] KVM test: kvm_tests.cfg.sample changes for unattended

2009-08-03 Thread Michael Goldish
- Lucas Meneghel Rodrigues l...@redhat.com wrote: In order to accomodate the unattended install test, some changes had to be made: * Now cd isos and md5 sum values don't belong only to the step file install only * introduced the needed variables for the unattended install test *

Re: [PATCH 2/6] KVM test: Introducing unattended install subtest

2009-08-03 Thread Michael Goldish
The test code looks nice and simple. However, I don't think putting some of the code in a class helps much (it doesn't hurt either). What do you think about this alternative, replacing from 'watcher = ...': server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind(('', 12323))

Re: [AUTOTEST]telnet login fails in win2k8 DC 64. here are debug and other info

2009-08-03 Thread Michael Goldish
sent a log of 4 seconds (starting at 12:27:25). How long does read_until_output_matches() wait before it gives up? - Original Message - From: sudhir kumar smalik...@gmail.com To: kvm-devel kvm@vger.kernel.org Cc: Lucas Meneghel Rodrigues mrodr...@redhat.com, Michael Goldish mgold

[KVM-AUTOTEST PATCH 07/12] KVM test: kvm_config.py: do not fail when including a nonexistent file

2009-08-02 Thread Michael Goldish
Instead of failing, just print a warning. Included files may not always be crucial for tests to run (kvm_cdkeys.cfg for example). Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_config.py | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions

[KVM-AUTOTEST PATCH 12/12] KVM test: make stress_boot work properly with TAP networking

2009-08-02 Thread Michael Goldish
command 'ps aux' with 'uname -a'. The silly reason for this is that DSL-4.2.5 doesn't like 'ps aux'. Since 'uname -a' is just as good (AFAIK), use it instead. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.cfg.sample |7 ++- client/tests/kvm/kvm_tests.py

[KVM-AUTOTEST PATCH 10/12] KVM test: kvm_utils.py: small fix for format_str_for_message()

2009-08-02 Thread Michael Goldish
format_str_for_message() sometimes adds an extra newline. Fix that. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py

[KVM-AUTOTEST PATCH 04/12] KVM test: add host-specific MAC-IP pool configuration

2009-08-02 Thread Michael Goldish
, use 'default_host'. - While we're at it, add a comment informing the user where to modify the test configration, if that is desirable - (Also add a missing space somewhere in the control file, and remove a few extra ones) Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm

[KVM-AUTOTEST PATCH 06/12] KVM test: minor style changes to kvm_config.py

2009-08-02 Thread Michael Goldish
- Fix indentation of a few lines. - Limit lines to 80 characters. - Use list comprehension in config.filter(). - Replace '== None' with 'is None'. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_config.py | 34 ++ 1 files changed, 18

[KVM-AUTOTEST PATCH 09/12] KVM test: dynamically detect and cache MAC-IP pairs using tcpdump

2009-08-02 Thread Michael Goldish
Run tcpdump in the background at all times and listen for DHCP communication. Whenever a DHCP server assigns an IP address to a MAC address, cache it for future reference. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py | 41

<    1   2   3   4   5   6   7   >