mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-27 15:45:54 +00:00
Due to the way Qemu handle the device, when an error occurs we must consume all pending data inside the callback which reads data from the device. If we don't flush this data, the next time spice-server tries to read from the device (after the guest closes/reopens it), we'll be getting stale data. This can happen because we cannot prevent the guest from writing to the device even after it got in an error state. This needs to be done within this callback, as QEMU returns 0 if you call SpiceCharDeviceInterface::read() outside of it. QEMU invokes this callback through a call to spice_server_char_device_wakeup. On the test now we must test that we receive an error from the device. Previously we checked that last part of the data was not read. Now potentially all data are read, so we need another way to check the device detected the error. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com> |
||
|---|---|---|
| .. | ||
| pki | ||
| valgrind | ||
| .gitignore | ||
| base_test.ppm | ||
| basic-event-loop.c | ||
| basic-event-loop.h | ||
| Makefile.am | ||
| README | ||
| regression-test.py | ||
| replay.c | ||
| stat-test.c | ||
| test-agent-msg-filter.c | ||
| test-channel.c | ||
| test-codecs-parsing.c | ||
| test-display-base.c | ||
| test-display-base.h | ||
| test-display-no-ssl.c | ||
| test-display-resolution-changes.c | ||
| test-display-streaming.c | ||
| test-display-width-stride.c | ||
| test-empty-success.c | ||
| test-fail-on-null-core-interface.c | ||
| test-glib-compat.c | ||
| test-glib-compat.h | ||
| test-gst.c | ||
| test-leaks.c | ||
| test-loop.c | ||
| test-multiple.py | ||
| test-options.c | ||
| test-playback.c | ||
| test-qxl-parsing.c | ||
| test-sasl.c | ||
| test-stat-file.c | ||
| test-stat.c | ||
| test-stream-device.c | ||
| test-stream.c | ||
| test-two-servers.c | ||
| test-vdagent.c | ||
| video-encoders | ||
What is here ============ This directory will contain a testsuite for the server. You can run all the tests and use libtool to debug any of them: libtool --mode=execute gdb test-just-sockets-no-ssl Overview of tests ================= test-just-sockets-no-ssl A complete server, only provides the main and inputs channels. Doesn't actually produce anything on the channels. Essentially a test of the regular link code (reds.c), good for multiple connect/disconnect tests. test-empty-success tests calling test-fail-on-null-core-interface should abort when run (when spice tries to watch_add) basic-event-loop.c event loop to provide core interface. Automated tests =============== test-display-streaming.c this test can be used to check regressions. For this, test-display-streaming needs to be called passing --automated-tests as parameter