qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cleber Rosa <crosa@redhat.com>
To: ccarrara@redhat.com,
	Wainer dos Santos Moschetta <wainersm@redhat.com>,
	qemu-devel@nongnu.org
Cc: ehabkost@redhat.com, philmd@redhat.com, lizhijian@cn.fujitsu.com
Subject: Re: [Qemu-devel] [PATCH] Acceptance tests: add Linux initrd checking test
Date: Thu, 18 Oct 2018 17:21:27 -0400	[thread overview]
Message-ID: <43272669-34e5-58aa-2898-331b4ce0c8a6@redhat.com> (raw)
In-Reply-To: <1444866c-59e1-1ef9-b137-b0607f34d219@redhat.com>



On 10/18/18 3:11 PM, Caio Carrara wrote:
> 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?
> 

We have verbalized and agreed on that indeed.  Wainer, can you please
add a simple line in the acceptance tests documentation mentioning that?

- Cleber.

> Since the comment above is just for clarification and not a blocking issue:
> 
> Reviewed-by: Caio Carrara <ccarrara@redhat.com>
> Tested-by: Caio Carrara <ccarrara@redhat.com>
> 

  reply	other threads:[~2018-10-18 21:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 16:20 [Qemu-devel] [PATCH] Acceptance tests: add Linux initrd checking test Wainer dos Santos Moschetta
2018-10-18 16:44 ` Philippe Mathieu-Daudé
2018-10-18 21:19   ` Cleber Rosa
2018-10-18 19:11 ` Caio Carrara
2018-10-18 21:21   ` Cleber Rosa [this message]
2018-10-18 21:45 ` Cleber Rosa
2018-10-18 22:09   ` Eduardo Habkost
2018-10-18 23:52     ` Cleber Rosa
2018-10-19  0:37       ` Eduardo Habkost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43272669-34e5-58aa-2898-331b4ce0c8a6@redhat.com \
    --to=crosa@redhat.com \
    --cc=ccarrara@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).