qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wainer dos Santos Moschetta <wainersm@redhat.com>
To: qemu-devel@nongnu.org
Cc: philmd@redhat.com, ehabkost@redhat.com, crosa@redhat.com
Subject: Re: [PATCH 0/2] tests/acceptance: Use QEMUMachine on tests that expect failure
Date: Mon, 9 Dec 2019 15:44:56 -0200	[thread overview]
Message-ID: <0315ccd0-0b00-fbd9-aadb-7cb9f26fadcd@redhat.com> (raw)
In-Reply-To: <20191112135801.854-1-wainersm@redhat.com>

Ping.

Any brave soul to review it? :)

- Wainer


On 11/12/19 11:57 AM, Wainer dos Santos Moschetta wrote:
> The linux_initrd and empty_cpu_model tests assert that QEMU exit
> with failure on certain scenarios. Currently they are not able
> to use QEMUMachine object due to the QMP monitor connection which
> is tentatively established always. Instead they handle the QEMU binary
> directy, but ideally they should use QEMUMachine in order to:
>   a) Take advantage of error handling and logging in QEMUMachine.
>   b) Follow the pattern in other acceptance tests.
>
> Notes worth it:
>   - Patch 01 first appeared in [1]. Here I propose the same
>     implementation but the code was rebased.
>   - empty_cpu_model used to check both stdout and stderr of the process. The
>     QEMUMachine doesn't provide an interface to access the underneath
>     process object, instead the process' output is available through
>     get_log(). This method in turn returns the content of stdout (stderr is
>     redirected to stdout). Therefore, I adapted the assertion statement
>     to check the '-cpu option cannot be empty' message shows in the output.
>
> Git:
>   - Tree: https://github.com/wainersm/qemu
>   - Branch: tests_without_qmp
>
> CI:
>   - Travis (PASS): https://travis-ci.org/wainersm/qemu/builds/610499693
>
> References:
> [1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg627498.html
>
> Wainer dos Santos Moschetta (2):
>    python/qemu: Add set_qmp_monitor() to QEMUMachine
>    tests/acceptance: Makes linux_initrd and empty_cpu_model use
>      QEMUMachine
>
>   python/qemu/machine.py              | 68 +++++++++++++++++++----------
>   tests/acceptance/empty_cpu_model.py | 13 +++---
>   tests/acceptance/linux_initrd.py    | 13 +++---
>   3 files changed, 59 insertions(+), 35 deletions(-)
>



      parent reply	other threads:[~2019-12-09 17:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 13:57 [PATCH 0/2] tests/acceptance: Use QEMUMachine on tests that expect failure Wainer dos Santos Moschetta
2019-11-12 13:58 ` [PATCH 1/2] python/qemu: Add set_qmp_monitor() to QEMUMachine Wainer dos Santos Moschetta
2019-12-10  5:17   ` Cleber Rosa
2019-12-11 14:55     ` Wainer dos Santos Moschetta
2019-11-12 13:58 ` [PATCH 2/2] tests/acceptance: Makes linux_initrd and empty_cpu_model use QEMUMachine Wainer dos Santos Moschetta
2019-12-10  5:24   ` Cleber Rosa
2019-12-09 17:44 ` Wainer dos Santos Moschetta [this message]

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=0315ccd0-0b00-fbd9-aadb-7cb9f26fadcd@redhat.com \
    --to=wainersm@redhat.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).