qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 19/22] iotests: add VM.test_launcn()


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 19/22] iotests: add VM.test_launcn()
Date: Tue, 22 Mar 2016 12:25:29 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

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 <address@hidden>
> ---
>  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

[Prev in Thread] Current Thread [Next in Thread]