]> xenbits.xensource.com Git - libvirt.git/commitdiff
virstoragetest: Add test case for NBD over unix socket with new syntax
authorPeter Krempa <pkrempa@redhat.com>
Mon, 12 Feb 2018 15:16:42 +0000 (16:16 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 14 Feb 2018 14:58:04 +0000 (15:58 +0100)
Use the new syntax which uses the 'UnixSocket' type in qemu.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
tests/virstoragetest.c

index 6eed7134ed8cb2e669e83df0f829f32fdc0ae59b..16c271c7810281881af876f2923eca6e111be0d4 100644 (file)
@@ -1494,6 +1494,15 @@ mymain(void)
                        "<source protocol='nbd' name='blah'>\n"
                        "  <host name='example.org' port='6000'/>\n"
                        "</source>\n");
+    TEST_BACKING_PARSE("json:{\"file\":{\"driver\":\"nbd\","
+                                       "\"server\": { \"type\":\"unix\","
+                                                     "\"path\":\"/path/socket\""
+                                                   "}"
+                                      "}"
+                            "}",
+                       "<source protocol='nbd'>\n"
+                       "  <host transport='unix' socket='/path/socket'/>\n"
+                       "</source>\n");
     TEST_BACKING_PARSE("json:{\"file\":{\"driver\":\"ssh\","
                                        "\"host\":\"example.org\","
                                        "\"port\":\"6000\","