From: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, marcandre.lureau@redhat.com,
pbonzini@redhat.com, kwolf@redhat.com, mreitz@redhat.com,
armbru@redhat.com, dgilbert@redhat.com, den@openvz.org
Subject: Re: [PATCH v2 1/2] iotests: add another bash sleep command to 247
Date: Tue, 24 Nov 2020 15:08:30 +0300 [thread overview]
Message-ID: <d22cf36e-0133-dfc6-0ae7-95e05a68ce04@virtuozzo.com> (raw)
In-Reply-To: <7fa343b4-cb87-cb64-956a-87c3a32f75cc@virtuozzo.com>
On 24.11.2020 13:04, Vladimir Sementsov-Ogievskiy wrote:
> 23.11.2020 18:44, Andrey Shinkevich wrote:
>> This patch paves the way for the one that follows. The following patch
>> makes the QMP monitor to read up to 4K from stdin at once. That results
>> in running the bash 'sleep' command before the _qemu_proc_exec() starts
>
> But how? Before _qemu_proc_exec() starts, qemu monitor is not runnning,
> and its new behavior can't influence..
>
I am not a bash expert to explain 'how' but this workaround works. It's
just a test. Maybe other colleagues can say.
> If bash subshell work in unpredictable way, may be better is refactor test
> to send commands one by one with help of _send_qemu_cmd. Then sleep will
> be natively executed between sending commands.
>
Or maybe write a similar test case in Python if Kevin agrees.
>> in subshell. Another 'sleep' command with an unobtrusive 'query-status'
>> plays as a workaround.
>>
>> Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
>> ---
>> tests/qemu-iotests/247 | 2 ++
>> tests/qemu-iotests/247.out | 1 +
>> 2 files changed, 3 insertions(+)
>>
>> diff --git a/tests/qemu-iotests/247 b/tests/qemu-iotests/247
>> index 87e37b3..7d316ec 100755
>> --- a/tests/qemu-iotests/247
>> +++ b/tests/qemu-iotests/247
>> @@ -59,6 +59,8 @@ TEST_IMG="$TEST_IMG.4" _make_test_img $size
>> {"execute":"block-commit",
>> "arguments":{"device":"format-4", "top-node": "format-2",
>> "base-node":"format-0", "job-id":"job0"}}
>> EOF
>> +sleep 1
>> +echo '{"execute":"query-status"}'
>> if [ "${VALGRIND_QEMU}" == "y" ]; then
>> sleep 10
>> else
>> diff --git a/tests/qemu-iotests/247.out b/tests/qemu-iotests/247.out
>> index e909e83..13d9547 100644
>> --- a/tests/qemu-iotests/247.out
>> +++ b/tests/qemu-iotests/247.out
>> @@ -17,6 +17,7 @@ QMP_VERSION
>> {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP},
>> "event": "BLOCK_JOB_COMPLETED", "data": {"device": "job0", "len":
>> 134217728, "offset": 134217728, "speed": 0, "type": "commit"}}
>> {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP},
>> "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id":
>> "job0"}}
>> {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP},
>> "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}}
>> +{"return": {"status": "running", "singlestep": false, "running": true}}
>> {"return": {}}
>> {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP},
>> "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
>> *** done
>>
>
>
next prev parent reply other threads:[~2020-11-24 12:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-23 15:44 [PATCH v2 0/2] Increase amount of data for monitor to read Andrey Shinkevich via
2020-11-23 15:44 ` [PATCH v2 1/2] iotests: add another bash sleep command to 247 Andrey Shinkevich via
2020-11-24 10:04 ` Vladimir Sementsov-Ogievskiy
2020-11-24 12:08 ` Andrey Shinkevich [this message]
2020-11-25 10:35 ` Dr. David Alan Gilbert
2020-11-24 12:29 ` Andrey Shinkevich
2020-11-23 15:44 ` [PATCH v2 2/2] monitor: increase amount of data for monitor to read Andrey Shinkevich via
2020-11-24 11:03 ` Vladimir Sementsov-Ogievskiy
2020-11-24 15:04 ` Vladimir Sementsov-Ogievskiy
2020-11-27 13:35 ` Andrey Shinkevich
2020-11-23 16:55 ` [PATCH v2 0/2] Increase " Andrey Shinkevich
2020-11-23 17:13 ` Andrey Shinkevich
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=d22cf36e-0133-dfc6-0ae7-95e05a68ce04@virtuozzo.com \
--to=andrey.shinkevich@virtuozzo.com \
--cc=armbru@redhat.com \
--cc=den@openvz.org \
--cc=dgilbert@redhat.com \
--cc=kwolf@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.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).