[PATCH] tests/ahci-test: replace HMP usage with QMP

marcandre.lureau@redhat.com posted 1 patch 1 week, 5 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260914075321.2429457-1-marcandre.lureau@redhat.com
Maintainers: John Snow <jsnow@redhat.com>, "Denis V. Lunev" <den@openvz.org>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
tests/qtest/ahci-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] tests/ahci-test: replace HMP usage with QMP
Posted by marcandre.lureau@redhat.com 1 week, 5 days ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Use qemu-io command instead.

(CI didn't catch this because build-without-defaults doesn't build ahci..)

CC: Denis V. Lunev <den@openvz.org>
Fixes: bc4f7b451e1f ("tests/qtest/ahci: fix a racy deadlock in the engine stop test")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 tests/qtest/ahci-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/ahci-test.c b/tests/qtest/ahci-test.c
index c49aa618629b..925f139d7590 100644
--- a/tests/qtest/ahci-test.c
+++ b/tests/qtest/ahci-test.c
@@ -1916,7 +1916,7 @@ static void test_write_engine_stop_in_flight(void)
      * Retire the abandoned write. handle_cmd() drops a command that arrives
      * while the drive is still busy and nothing retries it.
      */
-    g_free(qtest_hmp(ahci->parent->qts, "qemu-io drive0 \"aio_flush\""));
+    qtest_qemu_io(ahci->parent->qts, "drive0", "aio_flush");
 
     /* Round-trip through the device to confirm qemu is still alive. */
     ahci_px_rreg(ahci, port, AHCI_PX_TFD);
-- 
2.55.0.543.g5ebe2ebe4ea8


Re: [PATCH] tests/ahci-test: replace HMP usage with QMP
Posted by Denis V. Lunev 1 week, 5 days ago
On 9/14/26 09:53, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Use qemu-io command instead.
>
> (CI didn't catch this because build-without-defaults doesn't build ahci..)
>
> CC: Denis V. Lunev <den@openvz.org>
> Fixes: bc4f7b451e1f ("tests/qtest/ahci: fix a racy deadlock in the engine stop test")
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  tests/qtest/ahci-test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/qtest/ahci-test.c b/tests/qtest/ahci-test.c
> index c49aa618629b..925f139d7590 100644
> --- a/tests/qtest/ahci-test.c
> +++ b/tests/qtest/ahci-test.c
> @@ -1916,7 +1916,7 @@ static void test_write_engine_stop_in_flight(void)
>       * Retire the abandoned write. handle_cmd() drops a command that arrives
>       * while the drive is still busy and nothing retries it.
>       */
> -    g_free(qtest_hmp(ahci->parent->qts, "qemu-io drive0 \"aio_flush\""));
> +    qtest_qemu_io(ahci->parent->qts, "drive0", "aio_flush");
>  
>      /* Round-trip through the device to confirm qemu is still alive. */
>      ahci_px_rreg(ahci, port, AHCI_PX_TFD);
Reviewed-by: Denis V. Lunev  <den@openvz.org>