mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
To set up a listening socket usually you call in sequence: - socket; - bind; - listen. If you try to bind() to a port when another socket is already listening on that port, the bind() will fail. However, it is possible that the bind() may succeed and the listen() will fail, as demonstrated in the following sequence: - socket() create socket 1; - bind() to port N on socket 1; - socket() create socket 2; - bind() to port N on socket 2; - listen() on socket 1; - listen() on socket 2 <-- failure. When running tests (especially multiple tests running in parallel), it may sometimes happen that there are other tests already listening on the port that we are trying to use. In this case, we want to ignore this error and simply try to listen on a different port. We already attempted to handle this scenario, but we were only ignoring bind() errors and not listen() errors. So in the scenario mentioned above, the listen() error was causing the entire test to fail instead of allowing us to try to listen on another port. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com> |
||
|---|---|---|
| .. | ||
| pki | ||
| valgrind | ||
| .gitignore | ||
| base_test.ppm | ||
| basic-event-loop.c | ||
| basic-event-loop.h | ||
| Makefile.am | ||
| meson.build | ||
| 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-listen.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