[PATCH 02/24] virstoragetest: Drop testing of NBD backends via parsing real images

Peter Krempa pkrempa at redhat.com
Thu Sep 9 08:49:02 UTC 2021


We now have specific tests for the backing store parser and previous
tests cover the extraction of the backing store string so there's no
need for these particular tests.

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

diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index ab34f2f3be..f6af1a17ac 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -651,25 +651,6 @@ mymain(void)
     TEST_CHAIN(absqcow2, VIR_STORAGE_FILE_QCOW2, (&qcow2), EXP_FAIL);


-    /* Rewrite qcow2 to use an nbd: protocol as backend */
-    virCommandFree(cmd);
-    cmd = virCommandNewArgList(qemuimg, "rebase", "-u", "-f", "qcow2",
-                               "-F", "raw", "-b", "nbd:example.org:6000:exportname=blah",
-                               "qcow2", NULL);
-    if (virCommandRun(cmd, NULL) < 0)
-        ret = -1;
-    qcow2.expBackingStoreRaw = "nbd:example.org:6000:exportname=blah";
-
-    /* Qcow2 file with backing protocol instead of file */
-    testFileData nbd = {
-        .path = "blah",
-        .type = VIR_STORAGE_TYPE_NETWORK,
-        .format = VIR_STORAGE_FILE_RAW,
-        .protocol = VIR_STORAGE_NET_PROTOCOL_NBD,
-        .hostname = "example.org",
-    };
-    TEST_CHAIN(absqcow2, VIR_STORAGE_FILE_QCOW2, (&qcow2, &nbd), EXP_PASS);
-
     /* Rewrite qcow2 to use an nbd: protocol as backend */
     virCommandFree(cmd);
     cmd = virCommandNewArgList(qemuimg, "rebase", "-u", "-f", "qcow2",
@@ -689,18 +670,6 @@ mymain(void)
     };
     TEST_CHAIN(absqcow2, VIR_STORAGE_FILE_QCOW2, (&qcow2, &nbd2), EXP_PASS);

-    /* Rewrite qcow2 to use an nbd: protocol without path as backend */
-    virCommandFree(cmd);
-    cmd = virCommandNewArgList(qemuimg, "rebase", "-u", "-f", "qcow2",
-                               "-F", "raw", "-b", "nbd://example.org",
-                               "qcow2", NULL);
-    if (virCommandRun(cmd, NULL) < 0)
-        ret = -1;
-    qcow2.expBackingStoreRaw = "nbd://example.org";
-
-    nbd2.path = NULL;
-    TEST_CHAIN(absqcow2, VIR_STORAGE_FILE_QCOW2, (&qcow2, &nbd2), EXP_PASS);
-
     /* qed file */
     testFileData qed = {
         .expBackingStoreRaw = absraw,
-- 
2.31.1




More information about the libvir-list mailing list