[libvirt] [PATCH 2/3] virstoragetest: Add test case for NBD over unix socket with new syntax

Peter Krempa pkrempa at redhat.com
Mon Feb 12 15:20:59 UTC 2018


Use the new syntax which uses the 'UnixSocket' type in qemu.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 tests/virstoragetest.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index ea3d2833dd..87519495f0 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -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\","
-- 
2.15.0




More information about the libvir-list mailing list