qemu/tests
Juraj Marcin 1bd4237cb1 util/qemu-sockets: Introduce inet socket options controlling TCP keep-alive
With the default TCP stack configuration, it could be even 2 hours
before the connection times out due to the other side not being
reachable. However, in some cases, the application needs to be aware of
a connection issue much sooner.

This is the case, for example, for postcopy live migration. If there is
no traffic from the migration destination guest (server-side) to the
migration source guest (client-side), the destination keeps waiting for
pages indefinitely and does not switch to the postcopy-paused state.
This can happen, for example, if the destination QEMU instance is
started with the '-S' command line option and the machine is not started
yet, or if the machine is idle and produces no new page faults for
not-yet-migrated pages.

This patch introduces new inet socket parameters that control count,
idle period, and interval of TCP keep-alive packets before the
connection is considered broken. These parameters are available on
systems where the respective TCP socket options are defined, that
includes Linux, Windows, macOS, but not OpenBSD. Additionally, macOS
defines TCP_KEEPIDLE as TCP_KEEPALIVE instead, so the patch supplies its
own definition.

The default value for all is 0, which means the system configuration is
used.

Signed-off-by: Juraj Marcin <jmarcin@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-05-22 11:24:41 +01:00
..
bench tests/bench: Rename test_akcipher_keys.inc -> test_akcipher_keys.c.inc 2024-09-20 10:08:24 +03:00
data target/riscv: use RVB in RVA22U64 2025-03-04 15:42:54 +10:00
decode tests/: spelling fixes 2023-09-08 13:08:52 +03:00
docker tests: Add Dockerfile containing dependencies for Emscripten build 2025-05-06 16:02:04 +02:00
fp fpu: allow flushing of output denormals to be after rounding 2025-02-11 16:22:07 +00:00
functional tests/functional: Skip the screendump tests if the command is not available 2025-05-14 11:50:42 +02:00
guest-debug tests/tcg: Add late gdbstub attach test 2025-02-10 13:47:59 +00:00
image-fuzzer image-fuzzer: Use OSerror.strerror instead of tuple subscript 2019-11-05 16:36:11 +01:00
include tests: add missing generated sources to testqapi 2020-10-17 10:45:50 -04:00
keys tests/vm: Add Haiku test based on their vagrant images 2020-11-17 09:45:24 +01:00
lcitool lcitool: use newer Rust for Debian and Ubuntu 2025-05-06 16:02:04 +02:00
migration-stress guestperf: Add test result data into report 2025-02-14 15:19:07 -03:00
multiboot Remove superfluous .gitignore files 2020-10-13 12:48:17 +02:00
perf/block/qcow2 tests/perf: Test lseek influence on qcow2 block-status 2019-06-04 15:20:41 +02:00
qapi-schema docs/sphinx/qmp_lexer: Generalize elision syntax 2025-04-08 09:04:34 +02:00
qemu-iotests tests: Add iotest mirror-sparse for recent patches 2025-05-14 21:23:04 -05:00
qtest Qtest pull request 2025-05-12 11:11:37 -04:00
rocker
tcg hw/loongarch/virt: Get physical entry address with elf file 2025-05-06 09:17:32 +08:00
tsan block: remove AioContext locking 2023-12-21 22:49:27 +01:00
uefi-test-tools tests/data/uefi-boot-images: Add RISC-V ISO image 2024-07-03 18:14:06 -04:00
unit util/qemu-sockets: Introduce inet socket options controlling TCP keep-alive 2025-05-22 11:24:41 +01:00
vm tests/vm: bump timeout for shutdown 2025-03-10 10:30:00 +00:00
vmstate-static-checker-data hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
dbus-vmstate-daemon.sh tests: add dbus-vmstate-test 2020-01-06 18:41:32 +04:00
Makefile.include Remove the remainders of the Avocado tests 2025-04-23 07:51:25 +02:00
meson.build qapi: expose all schema features to code 2025-02-10 15:45:04 +01:00
test-qht-par.c
vhost-user-bridge.c error handling: Use RETRY_ON_EINTR() macro where applicable 2023-01-09 13:50:47 +01:00