On Mon, Jan 13, 2014 at 05:08:11PM -0200, Eduardo Habkost wrote: > I have just noticed that the cpuid.py check for QEMU error messages was > broken by: > > commit cdeed8a35629564c9790e9b19d6442bc2108ae7c > Author: Ruda Moura <[email protected]> > Date: Mon Dec 16 17:16:37 2013 -0200 ... > Now I am getting failures instead of SKIP results. For example: > > 13:46:42 ERROR| FAIL > type_specific.qemu_cpu.cpuid.full_dump.default.default.machine.rhel.rhel640.kvm.cpu.amd.athlon.unknown.rhel.6.6_4 > -> VMStartError: VM 'virt-tests-vm1' failed to start: Qemu is defunct. > Qemu output: > warning: host doesn't support requested feature: CPUID.80000001H:EDX.mmxext > [bit 22] > warning: host doesn't support requested feature: CPUID.80000001H:EDX.3dnowext > [bit 30] > warning: host doesn't support requested feature: CPUID.80000001H:EDX.3dnow > [bit 31] > qemu-kvm: Host's CPU doesn't support requested features > > The error above was supposed to be caught by the following code on > cpuid.py: > > try: > out = get_guest_cpuid( > self, cpu_model, cpu_model_flags + ',enforce', > extra_params=dict(machine_type=machine_type, smp=1)) > except virt_vm.VMStartError, e: ^^^^^^^^^^^^ So if you changed from Create to Start then e.output won't have the string you are looking for. > if "host doesn't support requested feature:" in e.output \ > or ("host cpuid" in e.output and > ("lacks requested flag" in e.output or > "flag restricted to guest" in e.output)): > raise error.TestNAError( > "Can't run CPU model %s on this host" % > (full_cpu_model_name)) > else: > raise
VMStartError will never raise with "host doesn't..." But I'm not sure if it's OK to catch CreateVMError and VMStartError except (virt_vm.CreateVMError, virt_vm.VMStartError) as e: if "host doesn't support requested feature:" in e.output \ ... Or just to keep catching CreateVMError and ignore VMStartError. It depends, more talk. > I am trying to understand how the new code is supposed to work: It calls is_defunct() to walk in the process tree, started to setup qemu environment, and tries to catch qemu in defunct state, which is just grep by <defunct> string for each process, and raises VMStartError with string "Qemu is defunct.\nQemu output:\n%s" attached. The initial purpose is to catch qemu dead in special situations, when virttest runs in sandbox ON (the default for a time) and there was not a previous white listed system call for a valid test. Say for running the 'audio.py' test in Fedora, virt-test was putting qemu in defunct state (is_alive can't detect) Is_alive is a test from the framework to check if the process tree for the test is sane. > The above QEMU error message was always caught by the > self.process.is_alive() check, but now the is_defunct() check is > catching it. > > So, is the is_alive() check obsolete? If it is not, why isn't it being > triggered anymore on my test case? No, absolute not! :) is_alive() cannot detect qemu in defunct state, just it. -- Ruda Moura _______________________________________________ Virt-test-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/virt-test-devel
