diff options
| author | Thomas Huth <thuth@redhat.com> | 2024-01-22 16:33:47 +0100 |
|---|---|---|
| committer | Thomas Huth <thuth@redhat.com> | 2024-01-23 15:25:45 +0100 |
| commit | e2c41766a9ad05b608671119661e4d8b7f53e5a2 (patch) | |
| tree | 583b0205b66d369df3771a1b696f133b136c6f01 /scripts/qapi/common.py | |
| parent | a1f5a47b60d119859d974bed4d66db745448aac6 (diff) | |
| download | focaccia-qemu-e2c41766a9ad05b608671119661e4d8b7f53e5a2.tar.gz focaccia-qemu-e2c41766a9ad05b608671119661e4d8b7f53e5a2.zip | |
tests/unit/test-iov: Fix timeout problem on NetBSD and OpenBSD
The test-iov code uses usleep() with small values (<= 30) in some nested loops with many iterations. This causes a small delay on OSes like Linux that have a precise sleeping mechanism, but on systems like NetBSD and OpenBSD, each usleep() call takes multiple microseconds, which then sum up in a total test time of multiple minutes! Looking at the code, the usleep() does not really seem to be necessary here - if not enough data could be send, we should simply always use select() to wait 'til we can send more. Thus remove the usleep() and re-arrange the code a little bit to make it more clear what is going on here. Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com> Message-ID: <20240122153347.71654-1-thuth@redhat.com> Reviewed-by: "Daniel P. Berrangé" <berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'scripts/qapi/common.py')
0 files changed, 0 insertions, 0 deletions