aboutsummaryrefslogtreecommitdiff
path: root/scripts/xml-preprocess.py
diff options
context:
space:
mode:
authorRoman Penyaev <r.peniaev@gmail.com>2025-01-23 09:53:23 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2025-02-03 13:57:08 +0400
commitc9c05ed525d368c0771ccf1195613bdf49d1bd21 (patch)
tree78816d77ecec33721c622a613669af25b40e1fce /scripts/xml-preprocess.py
parentb66ed232383162dc52d6a1c996599541860d1f1a (diff)
downloadqemu-c9c05ed525d368c0771ccf1195613bdf49d1bd21.zip
qemu-c9c05ed525d368c0771ccf1195613bdf49d1bd21.tar.gz
qemu-c9c05ed525d368c0771ccf1195613bdf49d1bd21.tar.bz2
tests/unit/test-char: add unit tests for hub chardev backend
This commit introduces a new test function `char_hub_test` to validate the functionality and constraints of the "hub" chardev backend in QEMU. The test includes multiple scenarios: 1. Invalid hub creation: - Creating a hub without defining `chardevs.N` (expects an error). - Creating a hub with an embedded multiplexer (`mux=on`) or a chardev already in use (expects errors). 2. Max backend limit: - Ensures the hub does not accept more backends than the maximum allowed, with appropriate error handling. 3. Valid hub creation and data aggregation: - Successfully creating a hub with two ring buffer backends. - Verifying data aggregation from backends to a frontend and vice versa. - Ensuring correct error handling for attempts to attach a hub multiple times or remove busy chardevs. 4. Extended EAGAIN simulation (non-Windows only): - Simulates a setup with three backends, including a pipe, to test EAGAIN handling and watcher behavior. - Verifies data flow and recovery in scenarios involving buffer overflows and drained pipes. The test also ensures correct cleanup of chardevs in all cases, covering both valid and invalid configurations. Signed-off-by: Roman Penyaev <r.peniaev@gmail.com> Reviewed-by: "Marc-André Lureau" <marcandre.lureau@redhat.com> Cc: qemu-devel@nongnu.org Message-ID: <20250123085327.965501-4-r.peniaev@gmail.com>
Diffstat (limited to 'scripts/xml-preprocess.py')
0 files changed, 0 insertions, 0 deletions