summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/plugin_vcpu_pause.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/plugin_vcpu_pause.c b/tests/plugin_vcpu_pause.c
index a9a27f8..ff69b04 100644
--- a/tests/plugin_vcpu_pause.c
+++ b/tests/plugin_vcpu_pause.c
@@ -238,6 +238,21 @@ int main(int argc, char** argv) {
         return 1;
     }
 
+    signal_unpause(crosvm, false);
+
+    /* Wait until VCPU thread tells us that it is no longer paused */
+    read(g_kill_evt, &dummy, sizeof(dummy));
+
+    /*
+     * Try pausing VCPUs 3rd time to see if we will miss pause
+     * request as we are exiting previous pause.
+     */
+    ret = signal_pause(crosvm);
+    if (ret) {
+        fprintf(stderr, "failed to pause vcpus (2nd time): %d\n", ret);
+        return 1;
+    }
+
     signal_unpause(crosvm, true);
 
     /* Wait until VCPU thread tells us that it is no longer paused */