Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
tests/qemumigparamsdata/basic.json | 9 +++++++++
tests/qemumigparamsdata/basic.reply | 12 ++++++++++++
tests/qemumigparamsdata/basic.xml | 11 +++++++++++
tests/qemumigparamsdata/empty.json | 3 +++
tests/qemumigparamsdata/empty.reply | 5 +++++
tests/qemumigparamsdata/empty.xml | 4 ++++
tests/qemumigparamstest.c | 2 ++
7 files changed, 46 insertions(+)
create mode 100644 tests/qemumigparamsdata/basic.json
create mode 100644 tests/qemumigparamsdata/basic.reply
create mode 100644 tests/qemumigparamsdata/basic.xml
create mode 100644 tests/qemumigparamsdata/empty.json
create mode 100644 tests/qemumigparamsdata/empty.reply
create mode 100644 tests/qemumigparamsdata/empty.xml
diff --git a/tests/qemumigparamsdata/basic.json b/tests/qemumigparamsdata/basic.json
new file mode 100644
index 0000000000..b810d7cc87
--- /dev/null
+++ b/tests/qemumigparamsdata/basic.json
@@ -0,0 +1,9 @@
+{
+ "compress-level": 1,
+ "compress-threads": 8,
+ "decompress-threads": 2,
+ "cpu-throttle-initial": 20,
+ "cpu-throttle-increment": 10,
+ "max-bandwidth": 33554432,
+ "downtime-limit": 300
+}
diff --git a/tests/qemumigparamsdata/basic.reply b/tests/qemumigparamsdata/basic.reply
new file mode 100644
index 0000000000..dd8c5287a5
--- /dev/null
+++ b/tests/qemumigparamsdata/basic.reply
@@ -0,0 +1,12 @@
+{
+ "id": "libvirt-1",
+ "return": {
+ "decompress-threads": 2,
+ "cpu-throttle-increment": 10,
+ "compress-threads": 8,
+ "compress-level": 1,
+ "cpu-throttle-initial": 20,
+ "max-bandwidth": 33554432,
+ "downtime-limit": 300
+ }
+}
diff --git a/tests/qemumigparamsdata/basic.xml b/tests/qemumigparamsdata/basic.xml
new file mode 100644
index 0000000000..2ca532eff5
--- /dev/null
+++ b/tests/qemumigparamsdata/basic.xml
@@ -0,0 +1,11 @@
+<test>
+ <migParams>
+ <param name='compress-level' value='1'/>
+ <param name='compress-threads' value='8'/>
+ <param name='decompress-threads' value='2'/>
+ <param name='cpu-throttle-initial' value='20'/>
+ <param name='cpu-throttle-increment' value='10'/>
+ <param name='max-bandwidth' value='33554432'/>
+ <param name='downtime-limit' value='300'/>
+ </migParams>
+</test>
diff --git a/tests/qemumigparamsdata/empty.json b/tests/qemumigparamsdata/empty.json
new file mode 100644
index 0000000000..0db3279e44
--- /dev/null
+++ b/tests/qemumigparamsdata/empty.json
@@ -0,0 +1,3 @@
+{
+
+}
diff --git a/tests/qemumigparamsdata/empty.reply b/tests/qemumigparamsdata/empty.reply
new file mode 100644
index 0000000000..7aae399ede
--- /dev/null
+++ b/tests/qemumigparamsdata/empty.reply
@@ -0,0 +1,5 @@
+{
+ "id": "libvirt-1",
+ "return": {
+ }
+}
diff --git a/tests/qemumigparamsdata/empty.xml b/tests/qemumigparamsdata/empty.xml
new file mode 100644
index 0000000000..8aa3abefc0
--- /dev/null
+++ b/tests/qemumigparamsdata/empty.xml
@@ -0,0 +1,4 @@
+<test>
+ <migParams>
+ </migParams>
+</test>
diff --git a/tests/qemumigparamstest.c b/tests/qemumigparamstest.c
index 4cc27bcf52..6fb404c24d 100644
--- a/tests/qemumigparamstest.c
+++ b/tests/qemumigparamstest.c
@@ -228,6 +228,8 @@ mymain(void)
} while (0)
DO_TEST("unsupported");
+ DO_TEST("empty");
+ DO_TEST("basic");
qemuTestDriverFree(&driver);
--
2.17.0