On 8/16/26 21:12, Marc-André Lureau wrote:
> Reviewed-by: Daniel P. Berrangé <[email protected]>
> Signed-off-by: Marc-André Lureau <[email protected]>
> ---
> tests/qtest/ahci-test.c | 5 ++---
> tests/qtest/ide-test.c | 4 ++--
> 2 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/tests/qtest/ahci-test.c b/tests/qtest/ahci-test.c
> index 71d23fe56af7..0528a422fafc 100644
> --- a/tests/qtest/ahci-test.c
> +++ b/tests/qtest/ahci-test.c
> @@ -1719,8 +1719,7 @@ static void test_atapi_engine_restart_in_flight(bool
> dma)
> qtest_memset(ahci->parent->qts, buffer, 0x00, ATAPI_SECTOR_SIZE);
>
> /* Suspend the next backend read so the ATAPI read stays in flight. */
> - g_free(qtest_hmp(ahci->parent->qts,
> - "qemu-io drive0 \"break read_aio rd\""));
> + qtest_qemu_io(ahci->parent->qts, "drive0", "break read_aio rd");
>
> cmd = ahci_atapi_command_create(CMD_ATAPI_READ_10, ATAPI_SECTOR_SIZE,
> dma);
> @@ -1732,7 +1731,7 @@ static void test_atapi_engine_restart_in_flight(bool
> dma)
> ahci_px_clr(ahci, port, AHCI_PX_CMD, AHCI_PX_CMD_ST);
> ahci_px_set(ahci, port, AHCI_PX_CMD, AHCI_PX_CMD_ST);
>
> - g_free(qtest_hmp(ahci->parent->qts, "qemu-io drive0 \"resume rd\""));
> + qtest_qemu_io(ahci->parent->qts, "drive0", "resume rd");
>
> /* Round-trip through the device to confirm qemu is still alive. */
> ahci_px_rreg(ahci, port, AHCI_PX_TFD);
> diff --git a/tests/qtest/ide-test.c b/tests/qtest/ide-test.c
> index b36b0f8875b2..31692f6925ac 100644
> --- a/tests/qtest/ide-test.c
> +++ b/tests/qtest/ide-test.c
> @@ -836,7 +836,7 @@ static void test_flush(void)
> make_dirty(qts, 0);
>
> /* Delay the completion of the flush request until we explicitly do it */
> - g_free(qtest_hmp(qts, "qemu-io ide0-hd0 \"break flush_to_os A\""));
> + qtest_qemu_io(qts, "ide0-hd0", "break flush_to_os A");
>
> /* FLUSH CACHE command on device 0*/
> qpci_io_writeb(dev, ide_bar, reg_device, 0);
> @@ -848,7 +848,7 @@ static void test_flush(void)
> assert_bit_clear(data, DF | ERR | DRQ);
>
> /* Complete the command */
> - g_free(qtest_hmp(qts, "qemu-io ide0-hd0 \"resume A\""));
> + qtest_qemu_io(qts, "ide0-hd0", "resume A");
>
> /* Check registers */
> data = qpci_io_readb(dev, ide_bar, reg_device);
>
Reviewed-by: Denis V. Lunev <[email protected]>