From 2775aada167fad5a508b16a8cadac1fca489c7be Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 16 Jan 2020 13:49:37 +0100 Subject: [PATCH] tests: virstorage: Add tests for NBD URI style syntax over UNIX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add few test cases for nbd+unix style URIs with few corner cases. The NBD URI syntax is documented at https://github.com/NetworkBlockDevice/nbd/blob/master/doc/uri.md Signed-off-by: Peter Krempa Reviewed-by: Eric Blake Reviewed-by: Ján Tomko --- 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) "\n" " \n" "\n"); + TEST_BACKING_PARSE("nbd+unix://?socket=/tmp/sock", + "\n" + " \n" + "\n"); + TEST_BACKING_PARSE("nbd+unix:///?socket=/tmp/sock", + "\n" + " \n" + "\n"); + TEST_BACKING_PARSE("nbd+unix:////?socket=/tmp/sock", + "\n" + " \n" + "\n"); + TEST_BACKING_PARSE("nbd+unix:///exp?socket=/tmp/sock", + "\n" + " \n" + "\n"); + TEST_BACKING_PARSE("nbd+unix:////exp?socket=/tmp/sock", + "\n" + " \n" + "\n"); TEST_BACKING_PARSE_FULL("iscsi://testuser:testpass@example.org:1234/exportname", "\n" " \n" -- GitLab