qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Acceptance tests: add Linux initrd checking tes


From: Caio Carrara
Subject: Re: [Qemu-devel] [PATCH] Acceptance tests: add Linux initrd checking test
Date: Thu, 18 Oct 2018 16:11:47 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Hi Wainer,

On 18-10-2018 13:20, Wainer dos Santos Moschetta wrote:
> [...]
> +    def test_with_2GB_file_should_exit_error_msg(self):
> +        """
> +        Pretends to boot QEMU with an initrd file with size of 2GB
> +        and expect it exits with error message.
> +        Regression test for bug fixed on commit f3839fda5771596152.
> +        """
> +        kernel_url = ('https://mirrors.kernel.org/fedora/releases/28/'
> +                      'Everything/x86_64/os/images/pxeboot/vmlinuz')
> +        kernel_hash = '238e083e114c48200f80d889f7e32eeb2793e02a'
> +        kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
> +
> +        with tempfile.NamedTemporaryFile() as initrd:
> +            initrd.seek(2048*(1024**2) -1)
> +            initrd.write(b'\0')
> +            initrd.flush()
> +            cmd = "%s -kernel %s -initrd %s" % (self.qemu_bin, kernel_path,
> +                                                initrd.name)
> +            res = run(cmd, ignore_status=True)
> +            self.assertNotEqual(res.exit_status, 0)
> +            expected_msg = r'.*initrd is too large.*max: \d+, need \d+.*'
> +            self.assertRegex(res.stderr_text, expected_msg)
> 

At least on my run this test is the first one to fail (with error) due
Python version (on Py2 there's no assertRegex method). AFIK we're moving
towards only Py3 support on the acceptance tests, right? The current
behavior (error) is the expected?

Since the comment above is just for clarification and not a blocking issue:

Reviewed-by: Caio Carrara <address@hidden>
Tested-by: Caio Carrara <address@hidden>

-- 
Caio Carrara
Software Engineer, Virt Team
Red Hat
address@hidden



reply via email to

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