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

Peter Krempa posted 3 patches 7 years, 3 months ago
There is a newer version of this series
[libvirt] [PATCH 2/3] virstoragetest: Add test case for NBD over unix socket with new syntax
Posted by Peter Krempa 7 years, 3 months ago
Use the new syntax which uses the 'UnixSocket' type in qemu.

Signed-off-by: Peter Krempa <pkrempa@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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 2/3] virstoragetest: Add test case for NBD over unix socket with new syntax
Posted by Ján Tomko 7 years, 2 months ago
On Mon, Feb 12, 2018 at 04:20:59PM +0100, Peter Krempa wrote:
>Use the new syntax which uses the 'UnixSocket' type in qemu.
>
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> tests/virstoragetest.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>

ACK

Jan
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list