]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemumigparamstest: Add test data for TLS parameters
authorJiri Denemark <jdenemar@redhat.com>
Mon, 19 Mar 2018 22:42:01 +0000 (23:42 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 17 Apr 2018 08:46:23 +0000 (10:46 +0200)
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemumigparamsdata/tls-enabled.json [new file with mode: 0644]
tests/qemumigparamsdata/tls-enabled.reply [new file with mode: 0644]
tests/qemumigparamsdata/tls-enabled.xml [new file with mode: 0644]
tests/qemumigparamsdata/tls-hostname.json [new file with mode: 0644]
tests/qemumigparamsdata/tls-hostname.reply [new file with mode: 0644]
tests/qemumigparamsdata/tls-hostname.xml [new file with mode: 0644]
tests/qemumigparamsdata/tls.json [new file with mode: 0644]
tests/qemumigparamsdata/tls.reply [new file with mode: 0644]
tests/qemumigparamsdata/tls.xml [new file with mode: 0644]
tests/qemumigparamstest.c

diff --git a/tests/qemumigparamsdata/tls-enabled.json b/tests/qemumigparamsdata/tls-enabled.json
new file mode 100644 (file)
index 0000000..d42684a
--- /dev/null
@@ -0,0 +1,11 @@
+{
+  "compress-level": 1,
+  "compress-threads": 8,
+  "decompress-threads": 2,
+  "cpu-throttle-initial": 20,
+  "cpu-throttle-increment": 10,
+  "tls-creds": "objlibvirt_migrate_tls0",
+  "tls-hostname": "",
+  "max-bandwidth": 33554432,
+  "downtime-limit": 300
+}
diff --git a/tests/qemumigparamsdata/tls-enabled.reply b/tests/qemumigparamsdata/tls-enabled.reply
new file mode 100644 (file)
index 0000000..001241b
--- /dev/null
@@ -0,0 +1,14 @@
+{
+  "id": "libvirt-1",
+  "return": {
+    "decompress-threads": 2,
+    "cpu-throttle-increment": 10,
+    "compress-threads": 8,
+    "tls-hostname": "",
+    "compress-level": 1,
+    "cpu-throttle-initial": 20,
+    "tls-creds": "objlibvirt_migrate_tls0",
+    "max-bandwidth": 33554432,
+    "downtime-limit": 300
+  }
+}
diff --git a/tests/qemumigparamsdata/tls-enabled.xml b/tests/qemumigparamsdata/tls-enabled.xml
new file mode 100644 (file)
index 0000000..3e60c4d
--- /dev/null
@@ -0,0 +1,13 @@
+<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='tls-creds' value='objlibvirt_migrate_tls0'/>
+    <param name='tls-hostname' value=''/>
+    <param name='max-bandwidth' value='33554432'/>
+    <param name='downtime-limit' value='300'/>
+  </migParams>
+</test>
diff --git a/tests/qemumigparamsdata/tls-hostname.json b/tests/qemumigparamsdata/tls-hostname.json
new file mode 100644 (file)
index 0000000..abbd9f1
--- /dev/null
@@ -0,0 +1,11 @@
+{
+  "compress-level": 1,
+  "compress-threads": 8,
+  "decompress-threads": 2,
+  "cpu-throttle-initial": 20,
+  "cpu-throttle-increment": 10,
+  "tls-creds": "objlibvirt_migrate_tls0",
+  "tls-hostname": "f27-1.virt",
+  "max-bandwidth": 33554432,
+  "downtime-limit": 300
+}
diff --git a/tests/qemumigparamsdata/tls-hostname.reply b/tests/qemumigparamsdata/tls-hostname.reply
new file mode 100644 (file)
index 0000000..74f069f
--- /dev/null
@@ -0,0 +1,14 @@
+{
+  "id": "libvirt-1",
+  "return": {
+    "decompress-threads": 2,
+    "cpu-throttle-increment": 10,
+    "compress-threads": 8,
+    "tls-hostname": "f27-1.virt",
+    "compress-level": 1,
+    "cpu-throttle-initial": 20,
+    "tls-creds": "objlibvirt_migrate_tls0",
+    "max-bandwidth": 33554432,
+    "downtime-limit": 300
+  }
+}
diff --git a/tests/qemumigparamsdata/tls-hostname.xml b/tests/qemumigparamsdata/tls-hostname.xml
new file mode 100644 (file)
index 0000000..4310e78
--- /dev/null
@@ -0,0 +1,13 @@
+<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='tls-creds' value='objlibvirt_migrate_tls0'/>
+    <param name='tls-hostname' value='f27-1.virt'/>
+    <param name='max-bandwidth' value='33554432'/>
+    <param name='downtime-limit' value='300'/>
+  </migParams>
+</test>
diff --git a/tests/qemumigparamsdata/tls.json b/tests/qemumigparamsdata/tls.json
new file mode 100644 (file)
index 0000000..02e90c6
--- /dev/null
@@ -0,0 +1,11 @@
+{
+  "compress-level": 1,
+  "compress-threads": 8,
+  "decompress-threads": 2,
+  "cpu-throttle-initial": 20,
+  "cpu-throttle-increment": 10,
+  "tls-creds": "",
+  "tls-hostname": "",
+  "max-bandwidth": 33554432,
+  "downtime-limit": 300
+}
diff --git a/tests/qemumigparamsdata/tls.reply b/tests/qemumigparamsdata/tls.reply
new file mode 100644 (file)
index 0000000..591eca6
--- /dev/null
@@ -0,0 +1,14 @@
+{
+  "id": "libvirt-1",
+  "return": {
+    "decompress-threads": 2,
+    "cpu-throttle-increment": 10,
+    "compress-threads": 8,
+    "tls-hostname": "",
+    "compress-level": 1,
+    "cpu-throttle-initial": 20,
+    "tls-creds": "",
+    "max-bandwidth": 33554432,
+    "downtime-limit": 300
+  }
+}
diff --git a/tests/qemumigparamsdata/tls.xml b/tests/qemumigparamsdata/tls.xml
new file mode 100644 (file)
index 0000000..71e5bbb
--- /dev/null
@@ -0,0 +1,13 @@
+<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='tls-creds' value=''/>
+    <param name='tls-hostname' value=''/>
+    <param name='max-bandwidth' value='33554432'/>
+    <param name='downtime-limit' value='300'/>
+  </migParams>
+</test>
index 6fb404c24d5ce3f33a8f87a9cc8312609f267f1d..ba62aacc5457dacb119ab831e5c64221aa437a73 100644 (file)
@@ -230,6 +230,9 @@ mymain(void)
     DO_TEST("unsupported");
     DO_TEST("empty");
     DO_TEST("basic");
+    DO_TEST("tls");
+    DO_TEST("tls-enabled");
+    DO_TEST("tls-hostname");
 
     qemuTestDriverFree(&driver);