KVM test: add proper prefixes to image, iso and step file paths
PATCH 1/2 KVM test: add proper prefixes to image, iso and step file paths
Since the control file cleanup, image, iso and step files are expected directly under the KVM test dir by default, but they should be in their respective
subdirectories: images should be in kvm/images/, isos should be in kvm/isos/ and step files should be in kvm/steps/.
This patch:
1. Makes KVM-Autotest expect isos, images and step files under their respective subdirectories, by adding prefixes to the paths in tests_base.cfg.sample.
2. Removes unnecessary prefixes from tests.cfg.sample.
3. Fixes comments in tests.cfg.sample.
--- client/tests/kvm/tests.cfg.sample | 12 ++++++------ client/tests/kvm/tests_base.cfg.sample | 5 +++++ 2 files changed, 11 insertions(+), 6 deletions(-)
client/tests/kvm/tests.cfg.sample +6 -6
@@ -11,14 +11,14 @@ include cdkeys.cfg # On the example below: # * qemu and qemu-img are expected to be found under /usr/bin/qemu-kvm and # /usr/bin/qemu-img respectively. -# * All image files are expected under tests/kvm/images/ -# * All iso files are expected under tests/kvm/isos/ -# * All step files are expected under tests/kvm/steps_data/ +# * All image files are expected under /tmp/kvm_autotest_root/images/ +# * All iso files are expected under /tmp/kvm_autotest_root/isos/ +# * All step files are expected under /tmp/kvm_autotest_root/steps/ #qemu_binary = /usr/bin/qemu-kvm #qemu_img_binary = /usr/bin/qemu-img -#image_name.* ?<= /tmp/kvm_autotest_root/images/ -#cdrom.* ?<= /tmp/kvm_autotest_root/isos/ -#steps ?<= /tmp/kvm_autotest_root/steps_data/ +#image_name.* ?<= /tmp/kvm_autotest_root/ +#cdrom.* ?<= /tmp/kvm_autotest_root/ +#steps ?<= /tmp/kvm_autotest_root/ variants: - @full:
client/tests/kvm/tests_base.cfg.sample +5 -0
@@ -884,3 +884,8 @@ variants: pre_command = "/usr/bin/python scripts/hugepage.py /mnt/kvm_hugepage" extra_params += " -mem-path /mnt/kvm_hugepage" + +image_name.* ?<= images/ +cdrom.* ?<= isos/ +steps ?<= steps/ +
Signature · 1 line
1.5.4.1
PATCH 2/2 KVM test: warn about corrupt PPM files after each test
--- client/tests/kvm/kvm_preprocessing.py | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
client/tests/kvm/kvm_preprocessing.py +5 -0
@@ -270,6 +270,11 @@ def postprocess(test, params, env): """ process(test, params, env, postprocess_image, postprocess_vm) + # Warn about corrupt PPM files + for f in glob.glob(os.path.join(test.debugdir, "*.ppm")): + if not ppm_utils.image_verify_ppm_file(f): + logging.warn("Found corrupt PPM file: %s", f) + # Should we convert PPM files to PNG format? if params.get("convert_ppm_files_to_png") == "yes": logging.debug("'convert_ppm_files_to_png' specified; converting PPM"
Signature · 1 line
1.5.4.1
Re: [Autotest] [KVM-AUTOTEST PATCH 2/2] KVM test: warn about corrupt PPM files after each test
Patch series applied, thanks!
Quoted 29 lines · Michael Goldish
Signed-off-by Michael Goldish <[email protected]>---
client/tests/kvm/kvm_preprocessing.py | 5 +++++1 files changed, 5 insertions(+), 0 deletions(-)client/tests/kvm/kvm_preprocessing.py +0
-0@@ -270,6 +270,11 @@ def postprocess(test, params, env):"""
process(test, params, env, postprocess_image, postprocess_vm)+ # Warn about corrupt PPM files
+ for f inglob.glob(os.path.join(test.debugdir, "*.ppm")):
+ if notppm_utils.image_verify_ppm_file(f):
+ logging.warn("Found corrupt PPM file: %s", f)
+
# Should we convert PPM files to PNG format?
ifparams.get("convert_ppm_files_to_png")== "yes":
logging.debug("'convert_ppm_files_to_png' specified; converting PPM" --
1.5.4.1_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
Signature · 1 line
Lucas