Skip to contentSkip to conversation

kvm-autotest new test, save and load

PATCH New David Huff 2 participants 3 messages Apr 6, 2009 KVM

lore
Share & tools
lore

David Huff

author
#0 lore raw

Submitting new test for review and comments.
This test was originally developed by the Red Hat QE team. It starts a new guest saves it and reloads the saved state.

looking for comments and or improvements that can be made to this test.

-D

author
#1 lore raw

PATCH 1/1 new test, saves and reloads a guest, from Red Hat QE

---
 client/tests/kvm_runtest_2/kvm_runtest_2.py     |    1 +
 client/tests/kvm_runtest_2/kvm_tests.cfg.sample |    6 ++
 client/tests/kvm_runtest_2/kvm_tests.py         |   97 +++++++++++++++++++++++
 3 files changed, 104 insertions(+), 0 deletions(-)
client/tests/kvm_runtest_2/kvm_runtest_2.py +1 -0
index c53877f..c83dce9 100644
@@ -34,6 +34,7 @@ class kvm_runtest_2(test.test):
                 "migration":    test_routine("kvm_tests",           "run_migration"),
                 "yum_update":   test_routine("kvm_tests",           "run_yum_update"),
                 "autotest":     test_routine("kvm_tests",           "run_autotest"),
+                "saveload":     test_routine("kvm_tests",           "run_save_load"),
                 "kvm_install":  test_routine("kvm_install",         "run_kvm_install"),
                 "linux_s3":     test_routine("kvm_tests",           "run_linux_s3"),
                 }
client/tests/kvm_runtest_2/kvm_tests.cfg.sample +6 -0
index 5619fa8..869398a 100644
@@ -48,6 +48,12 @@ variants:
         reboot = yes
         extra_params += " -snapshot"
         kill_vm_on_error = yes
+        
+    - saveload:	install
+    	type = saveload
+		pre_command = "if [ -f kvm_save_test_file ] ; then rm -rf kvm_save_test_file; fi"
+		do_command  = "touch kvm_save_test_file
+		verify_command = "[ -f kvm_save_test_file ]"
 
     - migrate:      install setup
         type = migration
client/tests/kvm_runtest_2/kvm_tests.py +97 -0

100 lines not on this page · raw message

Signature · 1 line
1.6.0.6
#2 lore raw
In reply to David Huff
Quoted 3 lines · David Huff

Submitting new test for review and comments. This test was originally developed by the Red Hat QE team. It starts a new guest saves it and reloads the saved state.

looking for comments and or improvements that can be made to this test.

I have some code (aimed at testing software within the guest, rather than kvm itself) which does this kind of operation quite frequently; the most common case where I've seen failures happen is when writes are active while state is being saved.

One enhancement might be to test the integrity of block device writes being done during the save/restore process itself -- for instance, write a file of all high bits, start a process overwriting it with all low bits, run the save and restore before the latter process has completed, and ensure that after the migration is complete and the process has finished, the file contains nothing but 0s.