qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] iotests/qsd-jobs: Use common.qemu for the QSD


From: Max Reitz
Subject: Re: [PATCH 2/2] iotests/qsd-jobs: Use common.qemu for the QSD
Date: Thu, 1 Apr 2021 17:33:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0

On 01.04.21 16:44, Vladimir Sementsov-Ogievskiy wrote:
01.04.2021 16:28, Max Reitz wrote:
Using common.qemu allows us to wait for specific replies, so we can for
example wait for events.  This allows starting the active commit job and
then wait for it to be ready before quitting the QSD, so we the output
is always the same.

(Strictly speaking, this is only necessary for the first test in
qsd-jobs, but we might as well make the second one use common.qemu's
infrastructure, too.)


Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
  tests/qemu-iotests/tests/qsd-jobs     | 55 ++++++++++++++++++++-------
  tests/qemu-iotests/tests/qsd-jobs.out | 10 ++++-
  2 files changed, 49 insertions(+), 16 deletions(-)

diff --git a/tests/qemu-iotests/tests/qsd-jobs b/tests/qemu-iotests/tests/qsd-jobs
index 972b6b3898..af7f886f15 100755
--- a/tests/qemu-iotests/tests/qsd-jobs
+++ b/tests/qemu-iotests/tests/qsd-jobs
@@ -38,6 +38,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
  cd ..
  . ./common.rc
  . ./common.filter
+. ./common.qemu
  _supported_fmt qcow2
  _supported_proto generic
@@ -52,32 +53,58 @@ echo "=== Job still present at shutdown ==="
  echo
  # Just make sure that this doesn't crash
-$QSD --chardev stdio,id=stdio --monitor chardev=stdio \
+qsd=y _launch_qemu \

sounds a bit strange.. Like we are starting qemu.

Yeah, well.  Yeah.  We could have a

_launch_qsd()
{
    qsd=y _launch_qemu
}

But this would still make it weird for all the other commands from common.qemu, and I don’t think it makes much sense to introduce aliases for all of them. So I think it’d be best to live with that bit of weirdness.

Max




reply via email to

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