Add few test cases for nbd+unix style URIs with few corner cases.t
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
tests/virstoragetest.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index 370e19252b..4341c04b1e 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -1274,6 +1274,26 @@ mymain(void)
"<source protocol='nbd'
name='exportname'>\n"
" <host name='example.org'
port='1234'/>\n"
"</source>\n");
+ TEST_BACKING_PARSE("nbd+unix://?socket=/tmp/sock",
+ "<source protocol='nbd'>\n"
+ " <host transport='unix'
socket='/tmp/sock'/>\n"
+ "</source>\n");
+ TEST_BACKING_PARSE("nbd+unix:///?socket=/tmp/sock",
+ "<source protocol='nbd'>\n"
+ " <host transport='unix'
socket='/tmp/sock'/>\n"
+ "</source>\n");
+ TEST_BACKING_PARSE("nbd+unix:////?socket=/tmp/sock",
+ "<source protocol='nbd'
name='/'>\n"
+ " <host transport='unix'
socket='/tmp/sock'/>\n"
+ "</source>\n");
+ TEST_BACKING_PARSE("nbd+unix:///exp?socket=/tmp/sock",
+ "<source protocol='nbd'
name='exp'>\n"
+ " <host transport='unix'
socket='/tmp/sock'/>\n"
+ "</source>\n");
+ TEST_BACKING_PARSE("nbd+unix:////exp?socket=/tmp/sock",
+ "<source protocol='nbd'
name='/exp'>\n"
+ " <host transport='unix'
socket='/tmp/sock'/>\n"
+ "</source>\n");
TEST_BACKING_PARSE_FULL("iscsi://testuser:testpass@example.org:1234/exportname",
"<source protocol='iscsi'
name='exportname'>\n"
" <host name='example.org'
port='1234'/>\n"
--
2.24.1