From f2367a6085be46fa0c3e948d0da1277f38bf2fa8 Mon Sep 17 00:00:00 2001 Message-Id: From: Peter Krempa Date: Fri, 17 Jan 2020 13:16:58 +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 (cherry picked from commit 2775aada167fad5a508b16a8cadac1fca489c7be) https://bugzilla.redhat.com/show_bug.cgi?id=1791614 Message-Id: <5c316356be1b5aca0cc2858925833e6316de10f8.1579263320.git.pkrempa@redhat.com> Reviewed-by: Ján Tomko Reviewed-by: Richard W.M. Jones --- 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" -- 2.25.0