tests/qtest: microbit-test: Fix socket access for win32
commite6f59e4c0b86a82cdaeacbd0ee94183b896523df
authorBin Meng <bin.meng@windriver.com>
Sun, 25 Sep 2022 11:30:22 +0000 (25 19:30 +0800)
committerThomas Huth <thuth@redhat.com>
Tue, 27 Sep 2022 18:51:21 +0000 (27 20:51 +0200)
tree8cc9a19ead0ac19252b959f891bacd701a9a8333
parenta68667066ad0b171a8938fb3f6bf0ad964362593
tests/qtest: microbit-test: Fix socket access for win32

Sockets on Windows do not use *nix-style file descriptors, so
write()/read()/close() do not work on Windows.

Switch over to use send()/recv()/closesocket() which work with
sockets on all platforms.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220925113032.1949844-45-bmeng.cn@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/qtest/microbit-test.c