qemu/qemu/5261dda97697ce4e1ff6dacf7b6a3cf4516ec547 tests/qtest/netdev-socket: replace HMP with x-query-network QMP
Replace the HMP "info network" text parsing with the structured
x-query-network QMP command. This makes the test assertions more robust
by matching individual fields (info-str) instead of parsing the full HMP
line format.
The EXPECT_STATE macro now takes an explicit netdev id argument to look
up the client by name in the QMP response. The strrchr truncation is
made NULL-safe: if the truncation character is not found, the full
string is compared (and the final g_assert_cmpstr will catch
mismatches).
While at it, fix the pre-existing duplicate "qemu/sockets.h" include,
and reorder includes.
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20260828-qemu-no-hmp-v5-20-9227de146347@redhat.com>
1 file changed