summaryrefslogtreecommitdiffstats
path: root/auto-virtserial.c
diff options
context:
space:
mode:
Diffstat (limited to 'auto-virtserial.c')
-rw-r--r--auto-virtserial.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/auto-virtserial.c b/auto-virtserial.c
index cb3f419..f7c106c 100644
--- a/auto-virtserial.c
+++ b/auto-virtserial.c
@@ -286,6 +286,15 @@ static int guest_get_sigio_poll_result(int nr)
return guest_cmd(&gpkt);
}
+static void guest_shutdown(void)
+{
+ struct guest_packet gpkt;
+
+ gpkt.key = KEY_SHUTDOWN;
+ guest_cmd_only(&gpkt);
+ return;
+}
+
static void show_stats(void)
{
fprintf(stderr, "-----\n");
@@ -1672,6 +1681,10 @@ next:
/* Now we're all set to start our tests. */
start_tests();
+
+ /* Send guest a command to shut itself down. */
+ guest_shutdown();
+
show_stats();
host_close_chardev(1);