This series contains: * a unit test that exposes a race condition which causes QEMU to fail to find a port even when there is plenty of available ports. * a refactor of the qemu-sockets inet_listen_saddr() function to better handle this situation.
Changes from v2: * Non-trivial rebase + further abstraction on top of 7ad9af343c7f1c70c8015c7c519c312d8c5f9fa1 'tests: add functional test validating ipv4/ipv6 address flag handling' Changes from v1: * Fix potential uninitialized variable only detected by optimize. * Improve unexpected error detection in test-listen to give more details about why the test fails unexpectedly. * Fix some line length style issues. Thanks, Knut Knut Omang (2): tests: Add test-listen - a stress test for QEMU socket listen sockets: Handle race condition between binds to the same port tests/Makefile.include | 2 +- tests/test-listen.c | 141 +++++++++++++++++++++++++++++++++++++- util/qemu-sockets.c | 159 ++++++++++++++++++++++++++++-------------- 3 files changed, 250 insertions(+), 52 deletions(-) create mode 100644 tests/test-listen.c base-commit: 7ad9af343c7f1c70c8015c7c519c312d8c5f9fa1 -- git-series 0.9.1