tests/qtest: libqtest: Correct the timeout unit of blocking receive calls for win32
authorBin Meng <bin.meng@windriver.com>
Fri, 28 Oct 2022 04:57:34 +0000 (12:57 +0800)
committerThomas Huth <thuth@redhat.com>
Fri, 28 Oct 2022 12:32:09 +0000 (14:32 +0200)
commitdb8fca024fa98241ed40470f87b8ecfb82c57d32
tree3338463e6ffe8855ea831f4336d33073dc0ca18d
parent8aff9c3279087b8527fd2c3dd4cf0706892887ba
tests/qtest: libqtest: Correct the timeout unit of blocking receive calls for win32

Some qtest cases don't get response from the QEMU executable under
test in time on Windows. It turns out that the socket receive call
got timeout before it receive the complete response.

The timeout value is supposed to be set to 50 seconds via the
setsockopt() call, but there is a difference among platforms.
The timeout unit of blocking receive calls is measured in
seconds on non-Windows platforms but milliseconds on Windows.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20221028045736.679903-10-bin.meng@windriver.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/qtest/libqtest.c