On 03/15/2016 02:04 PM, Vladimir Sementsov-Ogievskiy wrote:

in subject: s/launcn/launch/

> Test vm can launch and print output in case of fail. This function is
> needed for testing erroneous cases
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>
> ---
>  tests/qemu-iotests/iotests.py | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 

> +    def test_launch(self):
> +        '''Launch the VM, an error is expected'''
> +        try:
> +            self.launch()
> +        except:
> +            self._popen.wait()
> +            regex = re.compile(r"qemu-system-\w+")
> +            print "Test launch failed: %d" % self._popen.returncode
> +            print "--- qemu output ---"
> +            for line in open(self._qemu_log_path):
> +                #filter qtest comments
> +                if not "] OPENED" in line:
> +                    print regex.sub("qemu-system-*", line)
> +            print "--- end qemu output ---"
> +            return False
> +
> +        print "Tast launch successed!"

What? Did you mean "Test launch succeeded" ?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to