On Sun, 6 Sept 2026 at 09:54, Marc-André Lureau
<[email protected]> wrote:
>
> QOSState must be released with qtest_shutdown().
>
> Fixes: 0b70c6ce7b31 ("Add functional and unit tests for the vm-launch-update
> device")
> Signed-off-by: Marc-André Lureau <[email protected]>
> ---
> tests/qtest/launchupdate-test.c | 14 +++++---------
> tests/qtest/libqos/libqos.h | 2 ++
> 2 files changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/tests/qtest/launchupdate-test.c b/tests/qtest/launchupdate-test.c
> index ed007cdce29f..12a09079ae91 100644
> --- a/tests/qtest/launchupdate-test.c
> +++ b/tests/qtest/launchupdate-test.c
> @@ -51,7 +51,7 @@ static void test_vm_launch_update_capability(void)
> static void test_vm_launch_update_disable(void)
> {
> QFWCFG *fw_cfg;
> - QOSState *qs;
> + g_autoptr(QOSState) qs = NULL;
> VMLaunchUpdate launch_update;
> uint64_t control;
> size_t filesize;
> @@ -95,13 +95,12 @@ static void test_vm_launch_update_disable(void)
> g_assert_cmpint(VM_LAUNCHUPDATE_CTL_DISABLE & control, ==, 1);
>
> pc_fw_cfg_uninit(fw_cfg);
> - qtest_shutdown(qs);
> }
>
> static void check_error(void)
> {
> QFWCFG *fw_cfg;
> - QOSState *qs;
> + g_autoptr(QOSState) qs = NULL;
> VMLaunchUpdate launch_update;
> uint16_t status;
> size_t filesize;
> @@ -149,6 +148,7 @@ static void check_error(void)
> status = le64_to_cpu(launch_update.status);
> /* should fail with LOAD_FAIL since it was not IGVM format */
> g_assert_cmpint(status, ==, VM_LAUNCHUPDATE_LOAD_FAIL);
> +
Stray extra blank line.
> }
Otherwise
Reviewed-by: Peter Maydell <[email protected]>
thanks
-- PMM