[KVM-AUTOTEST][PATCH] Win2003-64.steps: fix a barrier at step 17 that sometimes fails due to popups.

2009-04-19 Thread Uri Lublin
From: Michael Goldish mgold...@redhat.com

Signed-off-by: Michael Goldish mgold...@redhat.com

diff --git a/client/tests/kvm_runtest_2/steps/Win2003-64.steps 
b/client/tests/kvm_runtest_2/steps/Win2003-64.steps
index 2ce794f..9a4d3e7 100644
--- a/client/tests/kvm_runtest_2/steps/Win2003-64.steps
+++ b/client/tests/kvm_runtest_2/steps/Win2003-64.steps
@@ -124,7 +124,7 @@ key 0xdc
 step 1081.26
 screendump 20080101_17_defe197bc5b379b442c5bbbf9fe649f1.ppm
 # Windows 2003 Start Menu Opened
-barrier_2 29 19 321 429 2c7df6a8da99f7a33e37b94d165129f4 19
+barrier_2 118 73 209 68 7c9eca05f228fe133007bffb22e14a0c 19
 # Sending keys: u
 key u
 # 
--
To unsubscribe from this list: send the line unsubscribe kvm-commits in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[KVM-AUTOTEST][PATCH] kvm_guest_wizard.py, stepmaker.py: do not explicitly print failure messages.

2009-04-19 Thread Uri Lublin
From: Michael Goldish mgold...@redhat.com

This is now taken care of by kvm_runtest_2.py.

Signed-off-by: Michael Goldish mgold...@redhat.com

diff --git a/client/tests/kvm_runtest_2/kvm_guest_wizard.py 
b/client/tests/kvm_runtest_2/kvm_guest_wizard.py
index 2f08c78..afe6b02 100644
--- a/client/tests/kvm_runtest_2/kvm_guest_wizard.py
+++ b/client/tests/kvm_runtest_2/kvm_guest_wizard.py
@@ -139,24 +139,16 @@ def barrier_2(vm, words, fail_if_stuck_for, 
stuck_detection_history, output_dir,
 def run_steps(test, params, env):
 vm = kvm_utils.env_get_vm(env, params.get(main_vm))
 if not vm:
-message = VM object not found in environment
-kvm_log.error(message)
-raise error.TestError, message
+raise error.TestError, VM object not found in environment
 if not vm.is_alive():
-message = VM seems to be dead; Guestwizard requires a living VM
-kvm_log.error(message)
-raise error.TestError, message
+raise error.TestError, VM seems to be dead; Guestwizard requires a 
living VM
 
 steps_filename = params.get(steps)
 if not steps_filename:
-message = Steps filename not specified
-kvm_log.error(message)
-raise error.TestError, message
+raise error.TestError, Steps filename not specified
 steps_filename = os.path.join(test.bindir, steps, steps_filename)
 if not os.path.exists(steps_filename):
-message = Steps file not found: %s % steps_filename
-kvm_log.error(message)
-raise error.TestError, message
+raise error.TestError, Steps file not found: %s % steps_filename
 
 fail_if_stuck_for = params.get(fail_if_stuck_for)
 if fail_if_stuck_for:
diff --git a/client/tests/kvm_runtest_2/stepmaker.py 
b/client/tests/kvm_runtest_2/stepmaker.py
index 476c145..54a1a4a 100644
--- a/client/tests/kvm_runtest_2/stepmaker.py
+++ b/client/tests/kvm_runtest_2/stepmaker.py
@@ -323,24 +323,16 @@ class StepMaker(stepeditor.StepMakerWindow):
 def run_stepmaker(test, params, env):
 vm = kvm_utils.env_get_vm(env, params.get(main_vm))
 if not vm:
-message = VM object not found in environment
-kvm_log.error(message)
-raise error.TestError, message
+raise error.TestError, VM object not found in environment
 if not vm.is_alive():
-message = VM seems to be dead; Step Maker requires a living VM
-kvm_log.error(message)
-raise error.TestError, message
+raise error.TestError, VM seems to be dead; Step Maker requires a 
living VM
 
 steps_filename = params.get(steps)
 if not steps_filename:
-message = Steps filename not specified
-kvm_log.error(message)
-raise error.TestError, message
+raise error.TestError, Steps filename not specified
 steps_filename = os.path.join(test.bindir, steps, steps_filename)
 if os.path.exists(steps_filename):
-message = Steps file %s already exists % steps_filename
-kvm_log.error(message)
-raise error.TestError, message
+raise error.TestError, Steps file %s already exists % steps_filename
 
 StepMaker(vm, steps_filename, test.debugdir, params)
 gtk.main()
--
To unsubscribe from this list: send the line unsubscribe kvm-commits in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[KVM-AUTOTEST][PATCH] kvm_guest_wizard.py: barrier_2: sleep at the end of each iteration.

2009-04-19 Thread Uri Lublin
From: Michael Goldish mgold...@redhat.com

Sleep at the end of the iteration, after checking the md5sum for the first
time. This enables us to pass the barrier very quickly in some cases.
(Currently we sleep first and check the md5sum later.)

Signed-off-by: Michael Goldish mgold...@redhat.com

diff --git a/client/tests/kvm_runtest_2/kvm_guest_wizard.py 
b/client/tests/kvm_runtest_2/kvm_guest_wizard.py
index afe6b02..c89e12e 100644
--- a/client/tests/kvm_runtest_2/kvm_guest_wizard.py
+++ b/client/tests/kvm_runtest_2/kvm_guest_wizard.py
@@ -51,8 +51,6 @@ def barrier_2(vm, words, fail_if_stuck_for, 
stuck_detection_history, output_dir,
 
 failure_message = None
 
-iteration = 0
-
 # Main loop
 while True:
 # Check for timeouts
@@ -63,13 +61,6 @@ def barrier_2(vm, words, fail_if_stuck_for, 
stuck_detection_history, output_dir,
 failure_message = guest is stuck
 break
 
-# Sleep for a while
-if iteration == 0 and sleep_duration == 1.0:
-time.sleep(0.5)
-else:
-time.sleep(sleep_duration)
-iteration += 1
-
 # Make sure vm is alive
 if not vm.is_alive():
 failure_message = VM is dead
@@ -108,6 +99,9 @@ def barrier_2(vm, words, fail_if_stuck_for, 
stuck_detection_history, output_dir,
 # Limit queue length to stuck_detection_history
 prev_whole_image_md5sums = 
prev_whole_image_md5sums[:stuck_detection_history]
 
+# Sleep for a while
+time.sleep(sleep_duration)
+
 # Failure
 message = Barrier failed at step %s after %.2f seconds (%s) % \
 (current_step_num, time.time() - start_time, failure_message)
--
To unsubscribe from this list: send the line unsubscribe kvm-commits in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[KVM-AUTOTEST][PATCH] RHEL-3.9 step files: fix the first barriers, which are a little risky.

2009-04-19 Thread Uri Lublin
From: Michael Goldish mgold...@redhat.com

In these step files, the regions picked for the barriers are updated before the
regions that actually indicate readiness for keyboard input (the boot: prompt).
Therefore, when the step files run, keyboard input (Enter key) is given before
the VM is ready, and thus has no effect.

Signed-off-by: Michael Goldish mgold...@redhat.com

diff --git a/client/tests/kvm_runtest_2/steps/RHEL-3.9-i386.steps 
b/client/tests/kvm_runtest_2/steps/RHEL-3.9-i386.steps
index 0b449d0..7e053f8 100644
--- a/client/tests/kvm_runtest_2/steps/RHEL-3.9-i386.steps
+++ b/client/tests/kvm_runtest_2/steps/RHEL-3.9-i386.steps
@@ -5,14 +5,14 @@
 # 
 step unknown
 screendump 20090404_143150_210be5cd4155aa4fdbd89494106b0f4d.ppm
-barrier_2 176 37 27 270 a3ea4e66598c86efeecc5926e244a8f5 20 optional
+barrier_2 42 171 0 265 1e64135a6da7be7e77f9de86f9eff237 20 optional
 # Sending keys: ret
 key ret
 # 
 step 33.24
 screendump 20080101_01_9e427763ab38cb59e66287f190585eb2.ppm
 # boot options
-barrier_2 272 19 30 26 4559684d52ebb532b4ccae01c190e45f 15 optional
+barrier_2 47 170 0 27 bb2399341a2c56e29213445c375779a6 15 optional
 # Sending keys: ret
 key ret
 # 
diff --git a/client/tests/kvm_runtest_2/steps/RHEL-3.9-x86_64.steps 
b/client/tests/kvm_runtest_2/steps/RHEL-3.9-x86_64.steps
index 9ef221a..6b3e8bf 100644
--- a/client/tests/kvm_runtest_2/steps/RHEL-3.9-x86_64.steps
+++ b/client/tests/kvm_runtest_2/steps/RHEL-3.9-x86_64.steps
@@ -7,7 +7,7 @@ step 33.24
 screendump 20080101_01_9e427763ab38cb59e66287f190585eb2.ppm
 # boot options
 sleep 5
-barrier_2 272 19 30 26 4559684d52ebb532b4ccae01c190e45f 166 optional
+barrier_2 47 167 0 27 a4964917d318bfb8b9094569e19b4d60 166 optional
 # Sending keys: ret
 key ret
 # 
--
To unsubscribe from this list: send the line unsubscribe kvm-commits in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[KVM-AUTOTEST][PATCH] make_html_report.py: don't use head -n 1 when getting the KVM version.

2009-04-19 Thread Uri Lublin
From: Michael Goldish mgold...@redhat.com

Use python's splitlines() instead of head -n 1 because the latter causes
broken pipe messages in some configurations.

Signed-off-by: Michael Goldish mgold...@redhat.com

diff --git a/client/tests/kvm_runtest_2/make_html_report.py 
b/client/tests/kvm_runtest_2/make_html_report.py
index 677da78..002062c 100755
--- a/client/tests/kvm_runtest_2/make_html_report.py
+++ b/client/tests/kvm_runtest_2/make_html_report.py
@@ -1636,12 +1636,14 @@ def get_keyval_value(result_dir, key):
 If no appropriate line is found, return 'Unknown'.
 
 keyval_pattern = os.path.join(result_dir, kvm_runtest_2.*, keyval)
-keyval_line = commands.getoutput(grep -h %s %s | head -n 1 % (key, 
keyval_pattern))
+keyval_lines = commands.getoutput(rgrep -h '\b%s\b.*=' %s % (key, 
keyval_pattern))
+if not keyval_lines:
+return Unknown
+keyval_line = keyval_lines.splitlines()[0]
 if key in keyval_line and = in keyval_line:
-value = keyval_line.split(=)[1].strip()
+return keyval_line.split(=)[1].strip()
 else:
-value = Unknown
-return value
+return Unknown
 
 
 def get_kvm_version(result_dir):
--
To unsubscribe from this list: send the line unsubscribe kvm-commits in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[KVM-AUTOTEST][PATCH] Fedora-8-i386.steps: fix a barrier at step 26 that sometimes fails.

2009-04-19 Thread Uri Lublin
From: Alexey Eromenko aerom...@redhat.com

Signed-off-by: Alexey Eromenko aerom...@redhat.com
Signed-off-by: Michael Goldish mgold...@redhat.com

diff --git a/client/tests/kvm_runtest_2/steps/Fedora-8-i386.steps 
b/client/tests/kvm_runtest_2/steps/Fedora-8-i386.steps
index b23878a..732d705 100644
--- a/client/tests/kvm_runtest_2/steps/Fedora-8-i386.steps
+++ b/client/tests/kvm_runtest_2/steps/Fedora-8-i386.steps
@@ -190,7 +190,7 @@ key alt-y
 step 1438.85
 screendump 20080101_26_ecf306a3f7ace4cb936f009c80afab21.ppm
 # date and time
-barrier_2 280 292 520 308 5b1d9fd42d7025be66355a94c4c93dbe 21
+barrier_2 221 290 579 310 4502dc2f76ed6aba1a2229c8385a8eae 21
 # Sending keys: alt-f
 key alt-f
 # 
--
To unsubscribe from this list: send the line unsubscribe kvm-commits in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[KVM-AUTOTEST][PATCH] WinXP-32.steps: add an optional barrier to deal with closed start menu.

2009-04-19 Thread Uri Lublin
From: Michael Goldish mgold...@redhat.com

Usually the barrier at step 24 should find an open start menu. Sometimes
the start menu is closed, so an additional step is needed to open it in that
case.

Signed-off-by: Michael Goldish mgold...@redhat.com

diff --git a/client/tests/kvm_runtest_2/steps/WinXP-32.steps 
b/client/tests/kvm_runtest_2/steps/WinXP-32.steps
index ca3cef8..b0c6e35 100644
--- a/client/tests/kvm_runtest_2/steps/WinXP-32.steps
+++ b/client/tests/kvm_runtest_2/steps/WinXP-32.steps
@@ -148,8 +148,20 @@ key alt-f
 # 
 step 2279.61
 screendump 20080101_24_51acae003d73d0f4a4c58fa0a053b471.ppm
-# Win XP Start Menu (opened)
-barrier_2 104 24 0 576 d14fcd1ec7ffcd0fa3e942b9caa4d4e5 240
+# Win XP desktop
+barrier_2 48 51 391 288 bbac8a522510d7c8d6e515f6a3fbd4c3 240
+# 
+step 2279.61
+screendump 20090416_150641_b72ad5c48ec2dbc9814d569e38cbb4cc.ppm
+# Win XP Start Menu (closed)
+barrier_2 104 41 0 559 a7cc02cecff2cb495f300aefbb99d9ae 5 optional
+# Sending keys: ctrl-esc
+key ctrl-esc
+# 
+step 2279.61
+screendump 20080101_24_51acae003d73d0f4a4c58fa0a053b471.ppm
+# Win XP Start Menu (open)
+barrier_2 189 67 0 533 69a5571c58bdf9e0acee8337883bec43 20
 # Sending keys: u
 key u
 # 
--
To unsubscribe from this list: send the line unsubscribe kvm-commits in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[KVM-AUTOTEST][PATCH] kvm_tests.cfg.sample: fix typo in RHEL.4.7.x86_64 ISO filename.

2009-04-19 Thread Uri Lublin
From: Alexey Eromenko aerom...@redhat.com

Signed-off-by: Alexey Eromenko aerom...@redhat.com
Signed-off-by: Michael Goldish mgold...@redhat.com
Signed-off-by: Uri Lublin u...@redhat.com

diff --git a/client/tests/kvm_runtest_2/kvm_tests.cfg.sample 
b/client/tests/kvm_runtest_2/kvm_tests.cfg.sample
index f621abe..68df834 100644
--- a/client/tests/kvm_runtest_2/kvm_tests.cfg.sample
+++ b/client/tests/kvm_runtest_2/kvm_tests.cfg.sample
@@ -236,7 +236,7 @@ variants:
 image_name = rhel4-64
 install:
 steps=RHEL-4.7-x86_64.steps
-cdrom=linux/RHEL-4-x86_64-DVD.iso
+cdrom=linux/RHEL-4.7-x86_64-DVD.iso
 md5sum=ea9dae16dd86f7d94092d0e672333292
 md5sum_1m=58fa63eaee68e269f4cb1d2edf479792
 
--
To unsubscribe from this list: send the line unsubscribe kvm-commits in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[KVM-AUTOTEST][PATCH] kvm_tests.cfg.sample: Windows: change migration_test_command to ver vol.

2009-04-19 Thread Uri Lublin
From: Michael Goldish mgold...@redhat.com

The current migration_test_command is help, which for some reason returns a
non-zero %errorlevel%. This makes get_command_status_output report the output
as if an error has occurred. ver  vol returns 0, and is also probably more
informative.

Signed-off-by: Michael Goldish mgold...@redhat.com

diff --git a/client/tests/kvm_runtest_2/kvm_tests.cfg.sample 
b/client/tests/kvm_runtest_2/kvm_tests.cfg.sample
index 68df834..cc0907b 100644
--- a/client/tests/kvm_runtest_2/kvm_tests.cfg.sample
+++ b/client/tests/kvm_runtest_2/kvm_tests.cfg.sample
@@ -269,6 +269,8 @@ variants:
 ssh_status_test_command = echo %errorlevel%
 username = Administrator
 password = 123456
+migrate:
+migration_test_command = ver  vol
 
 variants:
 - Win2000:
--
To unsubscribe from this list: send the line unsubscribe kvm-commits in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[KVM-AUTOTEST][PATCH] kvm_tests.cfg.sample: remove -snapshot from boot and reboot tests.

2009-04-19 Thread Uri Lublin
From: Michael Goldish mgold...@redhat.com

It shouldn't be too risky to run these tests without -snapshot. It will also
save some time because the following tests, which run without -snapshot, won't
have to restart the VM. That's true since following tests do not use
-snapshot, so the framework shuts down the VM and re-run without
-snapshot.

Signed-off-by: Michael Goldish mgold...@redhat.com
Signed-off-by: Uri Lublin u...@redhat.com

diff --git a/client/tests/kvm_runtest_2/kvm_tests.cfg.sample 
b/client/tests/kvm_runtest_2/kvm_tests.cfg.sample
index cc0907b..9798c83 100644
--- a/client/tests/kvm_runtest_2/kvm_tests.cfg.sample
+++ b/client/tests/kvm_runtest_2/kvm_tests.cfg.sample
@@ -42,13 +42,11 @@ variants:
 
 - boot: install setup
 type = boot
-extra_params +=  -snapshot
 kill_vm_on_error = yes
 
 - reboot:   install setup
 type = boot
 reboot = yes
-extra_params +=  -snapshot
 kill_vm_on_error = yes
 
 - migrate:  install setup
--
To unsubscribe from this list: send the line unsubscribe kvm-commits in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[KVM-AUTOTEST][PATCH] kvm_install: make buildir (where kvm is installed) next to srcdir

2009-04-19 Thread Uri Lublin
From: Uri Lublin u...@redhat.com

If the user specify a directory for the source (srcdir) it makes
sense that buildir would reside in the same directory.

This is useful for server dispatched client tests, as without
this patch one would have to re-install kvm for every job.

Note: this works for most used modes (kvm sources), including
git, snapshot and release. It may not work (meaning buildir will
not be next to srcdir) for e.g. localsrc.

Signed-off-by: Uri Lublin u...@redhat.com

diff --git a/client/tests/kvm_runtest_2/kvm_install.py 
b/client/tests/kvm_runtest_2/kvm_install.py
index 843a621..6d8fcb2 100755
--- a/client/tests/kvm_runtest_2/kvm_install.py
+++ b/client/tests/kvm_runtest_2/kvm_install.py
@@ -228,7 +228,10 @@ def __load_kvm_modules():
 
 def __install_kvm(test, srcdir):
 # create destination dir
-kvm_build_dir = os.path.join(test.bindir, build)
+
+kvm_build_dir = os.path.join(srcdir, '..', '..', 'build')
+kvm_build_dir = os.path.abspath(kvm_build_dir)
+
 if not os.path.exists(kvm_build_dir):
 os.mkdir(kvm_build_dir)
 
--
To unsubscribe from this list: send the line unsubscribe kvm-commits in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html