[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RFC v2 10/12] VMState test: hmp interface for period
From: |
Sanidhya Kashyap |
Subject: |
[Qemu-devel] [PATCH RFC v2 10/12] VMState test: hmp interface for period update |
Date: |
Fri, 25 Jul 2014 21:09:34 +0530 |
Signed-off-by: Sanidhya Kashyap <address@hidden>
---
hmp-commands.hx | 15 +++++++++++++++
hmp.c | 14 ++++++++++++++
hmp.h | 1 +
3 files changed, 30 insertions(+)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index c1dc6a2..6d15184 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1807,6 +1807,21 @@ STEXI
dumps and reads the device state's data from the memory for testing purpose
ETEXI
+ {
+ .name = "test_vmstates_set_period",
+ .args_type = "period:i",
+ .params = "period",
+ .help = "set the sleep interval for vmstates testing
process\n\t\t\t"
+ "period: the new sleep interval value to replace the
existing",
+ .mhandler.cmd = hmp_test_vmstates_set_period,
+ },
+
+STEXI
address@hidden test_vmstates_set_period @var{period}
address@hidden test_vmstates_set_period
+Set the period to @var{period} (int) for vmstate testing process.
+ETEXI
+
STEXI
@end table
ETEXI
diff --git a/hmp.c b/hmp.c
index 385fb99..f54b0b9 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1767,3 +1767,17 @@ void hmp_info_test_vmstates(Monitor *mon, const QDict
*qdict)
qapi_free_VMStateLogStateInfo(log_info);
}
+
+void hmp_test_vmstates_set_period(Monitor *mon, const QDict *qdict)
+{
+ int64_t period = qdict_get_int(qdict, "period");
+ Error *err = NULL;
+
+ qmp_test_vmstates_set_period(period, &err);
+
+ if (err) {
+ monitor_printf(mon, "test-vmstates-set-period: %s\n",
+ error_get_pretty(err));
+ error_free(err);
+ }
+}
diff --git a/hmp.h b/hmp.h
index b77f14c..e1afde8 100644
--- a/hmp.h
+++ b/hmp.h
@@ -97,6 +97,7 @@ void hmp_object_add(Monitor *mon, const QDict *qdict);
void hmp_object_del(Monitor *mon, const QDict *qdict);
void hmp_info_memdev(Monitor *mon, const QDict *qdict);
void hmp_test_vmstates(Monitor *mon, const QDict *qdict);
+void hmp_test_vmstates_set_period(Monitor *mon, const QDict *qdict);
void object_add_completion(ReadLineState *rs, int nb_args, const char *str);
void object_del_completion(ReadLineState *rs, int nb_args, const char *str);
void device_add_completion(ReadLineState *rs, int nb_args, const char *str);
--
1.9.3