summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/qtest/meson.build8
-rw-r--r--tests/unit/test-iov.c20
2 files changed, 16 insertions, 12 deletions
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index d22434b14e..84a055a7d9 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -1,16 +1,18 @@
 slow_qtests = {
   'aspeed_smc-test': 360,
-  'bios-tables-test' : 540,
+  'bios-tables-test' : 610,
+  'cdrom-test' : 610,
   'device-introspect-test' : 720,
   'migration-test' : 480,
   'npcm7xx_pwm-test': 300,
   'npcm7xx_watchdog_timer-test': 120,
   'qom-test' : 900,
   'test-hmp' : 240,
-  'pxe-test': 600,
+  'pxe-test': 610,
   'prom-env-test': 360,
-  'boot-serial-test': 240,
+  'boot-serial-test': 360,
   'qos-test': 120,
+  'vmgenid-test': 610,
 }
 
 qtests_generic = [
diff --git a/tests/unit/test-iov.c b/tests/unit/test-iov.c
index 6f7623d310..75bc3be005 100644
--- a/tests/unit/test-iov.c
+++ b/tests/unit/test-iov.c
@@ -197,15 +197,17 @@ static void test_io(void)
                    s = g_test_rand_int_range(0, j - k + 1);
                    r = iov_send(sv[1], iov, niov, k, s);
                    g_assert(memcmp(iov, siov, sizeof(*iov)*niov) == 0);
-                   if (r >= 0) {
-                       k += r;
-                       usleep(g_test_rand_int_range(0, 30));
-                   } else if (errno == EAGAIN) {
-                       select(sv[1]+1, NULL, &fds, NULL, NULL);
-                       continue;
-                   } else {
-                       perror("send");
-                       exit(1);
+                   if (r < 0) {
+                        if (errno == EAGAIN) {
+                            r = 0;
+                        } else {
+                            perror("send");
+                            exit(1);
+                        }
+                   }
+                   k += r;
+                   if (k < j) {
+                        select(sv[1] + 1, NULL, &fds, NULL, NULL);
                    }
                } while(k < j);
            }