[Spice-devel] [PATCH spice 16/18] server/tests: add SLEEP command to test_display_base
Yonit Halperin
yhalperi at redhat.com
Wed May 2 07:01:51 PDT 2012
---
server/tests/test_display_base.c | 4 ++++
server/tests/test_display_base.h | 6 ++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c
index 79781f7..8601611 100644
--- a/server/tests/test_display_base.c
+++ b/server/tests/test_display_base.c
@@ -498,6 +498,10 @@ static void produce_command(void)
command->cb(command);
}
switch (command->command) {
+ case SLEEP:
+ printf("sleep %u seconds\n", command->sleep.secs);
+ sleep(command->sleep.secs);
+ break;
case PATH_PROGRESS:
path_progress(&path);
break;
diff --git a/server/tests/test_display_base.h b/server/tests/test_display_base.h
index 1421c1c..b2221a2 100644
--- a/server/tests/test_display_base.h
+++ b/server/tests/test_display_base.h
@@ -24,6 +24,7 @@ typedef enum {
SIMPLE_UPDATE,
DESTROY_PRIMARY,
CREATE_PRIMARY,
+ SLEEP
} CommandType;
typedef struct CommandCreatePrimary {
@@ -45,6 +46,10 @@ typedef struct CommandDrawSolid {
uint32_t surface_id;
} CommandDrawSolid;
+typedef struct CommandSleep {
+ uint32_t secs;
+} CommandSleep;
+
typedef struct Command Command;
struct Command {
@@ -55,6 +60,7 @@ struct Command {
CommandCreatePrimary create_primary;
CommandDrawBitmap bitmap;
CommandDrawSolid solid;
+ CommandSleep sleep;
};
};
--
1.7.7.6
More information about the Spice-devel
mailing list