On 16/4/25 16:59, Nicholas Piggin wrote:
This function is duplicated 3 times, with more potential future users.
Factor it into libqos, using qtest_memset instead of qtest_writel to
clear the message just because that looks nicer with the qtest_memread
used to read it.

Signed-off-by: Nicholas Piggin <npig...@gmail.com>
---
  tests/qtest/libqos/pci.h               |  2 ++
  tests/qtest/libqos/pci.c               | 48 ++++++++++++++++++++++++++
  tests/qtest/libqos/virtio-pci-modern.c | 31 +++--------------
  tests/qtest/libqos/virtio-pci.c        | 40 ++++-----------------
  4 files changed, 62 insertions(+), 59 deletions(-)

Nice cleanup.

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>


Reply via email to