summaryrefslogtreecommitdiffstats
path: root/auto-virtserial.c
diff options
context:
space:
mode:
Diffstat (limited to 'auto-virtserial.c')
-rw-r--r--auto-virtserial.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/auto-virtserial.c b/auto-virtserial.c
index b064a98..e0a61f6 100644
--- a/auto-virtserial.c
+++ b/auto-virtserial.c
@@ -1261,6 +1261,50 @@ static int test_sigio_handler(int nr)
ret, POLLHUP, POLLHUP, OP_EQ, true);
guest_close_port(nr);
+
+ /* Now opening multiple ports and watching for multiple SIGIOs */
+ guest_open_port(2);
+ guest_open_port(3);
+ guest_open_port(4);
+
+ sleep(2);
+
+ host_connect_chardev(2);
+ host_connect_chardev(3);
+ host_connect_chardev(4);
+
+ sleep(2);
+
+ ret = guest_get_sigio_poll_result(2);
+ err = result(__func__, true, "multi-o2",
+ ret, POLLOUT, POLLOUT, OP_EQ, false);
+ ret = guest_get_sigio_poll_result(3);
+ err = result(__func__, true, "multi-o3",
+ ret, POLLOUT, POLLOUT, OP_EQ, false);
+ ret = guest_get_sigio_poll_result(4);
+ err = result(__func__, true, "multi-o4",
+ ret, POLLOUT, POLLOUT, OP_EQ, false);
+
+ host_close_chardev(2);
+ host_close_chardev(3);
+ host_close_chardev(4);
+
+ sleep(2);
+
+ ret = guest_get_sigio_poll_result(2);
+ err = result(__func__, true, "multi-c2",
+ ret, POLLHUP, POLLHUP, OP_EQ, true);
+ ret = guest_get_sigio_poll_result(3);
+ err = result(__func__, true, "multi-c3",
+ ret, POLLHUP, POLLHUP, OP_EQ, true);
+ ret = guest_get_sigio_poll_result(4);
+ err = result(__func__, true, "multi-c4",
+ ret, POLLHUP, POLLHUP, OP_EQ, true);
+
+ guest_close_port(2);
+ guest_close_port(3);
+ guest_close_port(4);
+
return err;
}