Skip to content

vtest: make client disconnect more intuitive

Yiwei Zhang requested to merge zzyiwei/virglrenderer:vtest-disconnect into master

When the app destroys the vtest renderer, the vtest client shuts down the socket or directly close it, and the detection of such on the server side is via a read with zero bytes returned without errors. This change adds a non-error result code for such case to avoid confusions.

For guest vkcube launch and close, with vtest server:

$ /usr/local/bin/virgl_test_server --no-fork --multi-clients --venus --no-virgl
multi-clients enabled: clients must trust each other

Before:

proxy: proxy server with pid 1489737
vtest_client_dispatch_commands: client context created.
client failed: VTEST_CLIENT_ERROR_INPUT_READ

After:

proxy: proxy server with pid 1568433
vtest_client_dispatch_commands: client context created.
client: VTEST_CLIENT_DISCONNECTED

Merge request reports

Loading