]> Git Repo - qemu.git/commit
libqtest: handle zero length memwrite/memread
authorGreg Kurz <[email protected]>
Wed, 11 Jan 2017 08:49:32 +0000 (09:49 +0100)
committerPeter Maydell <[email protected]>
Thu, 12 Jan 2017 10:45:59 +0000 (10:45 +0000)
commit204febd17f9ebb9e94b1980b42c7f2c2307851c1
treee916ffcb714e57fe47a278b76b5e0607c2494778
parentb44486dfb9447c88e4b216e730adcc780190852c
libqtest: handle zero length memwrite/memread

Some recently added tests pass a zero length to qtest_memwrite().
Unfortunately, the qtest protocol doesn't implement an on-the-wire
syntax for zero-length writes and the current code happily sends
garbage to QEMU. This causes intermittent failures.

It isn't worth the pain to enhance the protocol, so this patch
simply fixes the issue by "just return, doing nothing". The same
fix is applied to qtest_memread() since the issue also exists in
the QEMU part of the "memread" command.

Suggested-by: Peter Maydell <[email protected]>
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: John Snow <[email protected]>
Message-id: 148412457273.22750.983275587432075569.stgit@bahia
Signed-off-by: Peter Maydell <[email protected]>
qtest.c
tests/libqtest.c
This page took 0.023688 seconds and 4 git commands to generate.