All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wainer dos Santos Moschetta <wainersm@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Liam Merwick" <liam.merwick@oracle.com>,
	alex.bennee@linaro.org, fam@euphon.net,
	"Cleber Rosa" <crosa@redhat.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, slp@redhat.com,
	sgarzare@redhat.com
Subject: Re: [PATCH v2 2/6] tests/boot_linux_console: add BIOS acceptance test
Date: Wed, 19 Feb 2020 16:20:06 -0300	[thread overview]
Message-ID: <f610e44e-57d8-cfb2-efd1-f567136bf416@redhat.com> (raw)
In-Reply-To: <e7db8848-b8fb-94ff-a229-779b532c5e18@redhat.com>


On 2/6/20 12:12 PM, Philippe Mathieu-Daudé wrote:
> On 2/5/20 3:56 PM, Liam Merwick wrote:
>> Add a test to use qboot with the 'pc' machine class and SeaBIOS with
>> the 'microvm' machine class (since microvm uses qboot by default) by
>> adding the '-bios' option via self.vm.add_args() before
>> calling do_test_x86_64_machine().
>>
>> Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
>> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
>> ---
>>   tests/acceptance/boot_linux_console.py | 17 ++++++++++++++++-
>>   1 file changed, 16 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/acceptance/boot_linux_console.py 
>> b/tests/acceptance/boot_linux_console.py
>> index 233601b429bd..e9375590bc1c 100644
>> --- a/tests/acceptance/boot_linux_console.py
>> +++ b/tests/acceptance/boot_linux_console.py
>> @@ -61,7 +61,6 @@ class BootLinuxConsole(Test):
>>                         '/vmlinuz')
>>           kernel_hash = '23bebd2680757891cf7adedb033532163a792495'
>>           kernel_path = self.fetch_asset(kernel_url, 
>> asset_hash=kernel_hash)
>> -
>>           self.vm.set_console()
>>           kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 
>> 'console=ttyS0'
>>           self.vm.add_args('-kernel', kernel_path,
>> @@ -77,6 +76,14 @@ class BootLinuxConsole(Test):
>>           """
>>           self.do_test_x86_64_machine()
>>   +    def test_x86_64_pc_qboot(self):
>> +        """
>> +        :avocado: tags=arch:x86_64
>> +        :avocado: tags=machine:pc
>> +        """
>> +        self.vm.add_args('-bios', 'pc-bios/bios-microvm.bin')

The test boots QEMU with bios file from $PWD/pc-bios/bios-microvm.bin. 
If you want to get (optionally) the file from an installed QEMU you 
could use Avocado test parameters [1]. Here goes an example:

self.vm.add_args('-bios', self.params.get('bios_microvm', 
default='pc-bios/bios-microvm.bin'))

Then you evoke avocado as:

$ avocado run -p bios_microvm=/usr/share/qemu/bios-microvm.bin (...)

[1] 
https://avocado-framework.readthedocs.io/en/75.1/guides/writer/chapters/parameters.html


>>
>
> This breaks running once QEMU is installed:
>
>  (2/4) 
> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_x86_64_pc_qboot:
> qemu: could not load PC BIOS 'pc-bios/bios-microvm.bin'
> ERROR: [Errno 104] Connection reset by peer (0.08 s)
>
> Cleber, Wainer, what path should we use?


Philippe, above answers your question?

Thanks,

- Wainer

>
>
>> +        self.do_test_x86_64_machine()
>> +
>>       def test_x86_64_microvm(self):
>>           """
>>           :avocado: tags=arch:x86_64
>> @@ -84,6 +91,14 @@ class BootLinuxConsole(Test):
>>           """
>>           self.do_test_x86_64_machine()
>>   +    def test_x86_64_microvm_seabios(self):
>> +        """
>> +        :avocado: tags=arch:x86_64
>> +        :avocado: tags=machine:microvm
>> +        """
>> +        self.vm.add_args('-bios', 'pc-bios/bios.bin')
>> +        self.do_test_x86_64_machine()
>> +
>>       def test_mips_malta(self):
>>           """
>>           :avocado: tags=arch:mips
>>
>



  reply	other threads:[~2020-02-19 19:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 14:55 [PATCH v2 0/6] tests/boot_linux_console: add extra boot acceptance tests Liam Merwick
2020-02-05 14:56 ` [PATCH v2 1/6] tests/boot_linux_console: add microvm acceptance test Liam Merwick
2020-02-06 13:57   ` Philippe Mathieu-Daudé
2020-02-06 14:09     ` Philippe Mathieu-Daudé
2020-02-06 15:05       ` Liam Merwick
2020-02-19 19:02         ` Wainer dos Santos Moschetta
2020-02-05 14:56 ` [PATCH v2 2/6] tests/boot_linux_console: add BIOS " Liam Merwick
2020-02-06 14:12   ` Philippe Mathieu-Daudé
2020-02-19 19:20     ` Wainer dos Santos Moschetta [this message]
2020-02-26 17:36       ` Liam Merwick
2020-02-05 14:56 ` [PATCH v2 3/6] travis.yml: install rpm2cpio for acceptance tests Liam Merwick
2020-02-06 14:27   ` Philippe Mathieu-Daudé
2020-02-05 14:56 ` [PATCH v2 4/6] tests/boot_linux_console: add extract_from_rpm method Liam Merwick
2020-02-06 14:27   ` Philippe Mathieu-Daudé
2020-02-05 14:56 ` [PATCH v2 5/6] tests/boot_linux_console: add PVH acceptance tests Liam Merwick
2020-02-06 14:24   ` Philippe Mathieu-Daudé
2020-02-05 14:56 ` [PATCH v2 6/6] tests/boot_linux_console: use os.path for filesystem paths Liam Merwick
2020-02-06 14:26   ` Philippe Mathieu-Daudé
2020-02-06 15:24 ` [PATCH v2 0/6] tests/boot_linux_console: add extra boot acceptance tests Philippe Mathieu-Daudé

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=f610e44e-57d8-cfb2-efd1-f567136bf416@redhat.com \
    --to=wainersm@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=crosa@redhat.com \
    --cc=fam@euphon.net \
    --cc=liam.merwick@oracle.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@redhat.com \
    --cc=slp@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.