Added the option to build the test on Linux using the Makefile.
On Linux, The test will run the speed test on the server mode by default.
Signed-off-by: Ali Abu-Foul <[email protected]>
The speed test can be built for both Linux and Windows and intended to run
as following:
* Client in on Windows side.
* Server is on Linux side.
* Client sends a big block prepended by the header.
* Server receives the header, then receives the data, then sends short
respose to the client.
* Client receives the response and can evaluate the speed of the transfer.
On Windows, The test will run the speed test on client mode when the
option "-sp" is used.
When runnig the speed test, the follwing qemu command should be added:
-chardev socket,path=/tmp/foo,id=foo
-device virtserialport,bus=virtio-serial0.0,nr=2,chardev=foo,id=test0,name=test0
Signed-off-by: Ali Abu-Foul <[email protected]>
If the port can't be open (probably opened by vdservice), go to
the next one.
Add ability to increase write buffer size and send
entire buffer filled by characters without getting data from the
console.
This helps testing corner cases of vioser.sys, for example:
configure additional test port port with tcp socket backend,
connect to it with 'nc', press ^Z to suspend the 'nc' and send
several large (512K) buffers.
At some point the write does not return immediately and closing
test application causes cancellation flow.
Another scenarion: if 1M buffer sent, the driver fails the operation
due to too large SG table.
Signed-off-by: Yuri Benditovich <[email protected]>
Static analysis was failing with:
app\device.cpp(114): warning C6387: 'ol.hEvent' could be '0': this does not adhere to the specification for the function 'CloseHandle'.
app\device.cpp(196): warning C6387: 'ol.hEvent' could be '0': this does not adhere to the specification for the function 'CloseHandle'.
app\main.cpp(183): warning C28285: For function 'wmain' '_Param_(2)' syntax error in 'SAL_readableTo(elementCount(Argc))' near 'Argc))'.
Signed-off-by: Ladi Prosek <[email protected]>
The driver now returns STATUS_BUFFER_OVERFLOW if the output buffer is big
enough for the VIRTIO_PORT_INFO structure but not big enough for the port
name. The IOCTL method is now METHOD_OUT_DIRECT to enable passing the
required length back to the caller.
This reverts the user space part of commit a7e92d7e8c.
The current code doesn't work. If the supplied output buffer is too small,
the caller does not receive the required size in lpBytesReturned as
intended.
Relevant blog post: http://bit.ly/1NxJik3
I am simply switching to a reasonably sized fixed buffer on the calling
side, exactly what SerialPort::SerialPort() does. The IOCTL implementation
is tweaked to make it clear that the buffer size is not communicated back
on failure.