From nobody Sat Feb 7 08:27:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1661179710; cv=none; d=zohomail.com; s=zohoarc; b=Sur5lcVSdsAlZFn7uJw4ol1tQnDlB+sqETAgSbbvX9xysKc84Pigb7ZTxVM75ypzcMtEh7ii6eUH+jbTrnw/aaH2+NRJpUNnabEHUJM3GEKnxSwB0CqpGNHhoRD4wTVxL1X/4t7Zh4m6m2Xskhv3ReOO/nx6miedqv9Y/Oxkdzc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661179710; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Uxs8CDe15L03mpPfJo7f5yXo99zJ6pwDeFYA7zA1KWE=; b=lcCg3jG7KpHU+E1eQJGSCTScUGP3M7aZP2VkwI8Wg3qoK1BM+vxCZzQbSqRb3cSrnw6lWmASw1nlbmPszd/wO/GWZPvX4J7M80jdwpto35jEanZVtx1RgwV1lstbzjkxFTmeHcLCHZifvcDza0mHwwAbOh+QiTwAPeKTNoM7GGw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1661179710813788.2162196945419; Mon, 22 Aug 2022 07:48:30 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-83-r9Zktw9INbCkc8SyCMHKDg-1; Mon, 22 Aug 2022 10:48:25 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 69246185A79C; Mon, 22 Aug 2022 14:48:22 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 55A45141511A; Mon, 22 Aug 2022 14:48:22 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 463191946A58; Mon, 22 Aug 2022 14:48:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 59AA01946A70 for ; Mon, 22 Aug 2022 14:48:21 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 4CBF3492C3B; Mon, 22 Aug 2022 14:48:21 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9827640334B for ; Mon, 22 Aug 2022 14:48:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661179709; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Uxs8CDe15L03mpPfJo7f5yXo99zJ6pwDeFYA7zA1KWE=; b=MUklwGnyM06xblVVQ5X3Vxny1GvGI5bAEWhH3F9+3qYicEj1LW5+MbE8DtMwx4M9U5czQe tsHYwxTs/4H+u1t96a+tEqsW/wyAZtp7QU5VrQwR/TvrURstXbGNkmUMLLCTyhGiTxwkgg Taf+bLvgsVb9Alvbp8qaTxuvUwAwVWs= X-MC-Unique: r9Zktw9INbCkc8SyCMHKDg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/5] tests: Remove storage pool/vol tests for sheepdog Date: Mon, 22 Aug 2022 16:48:13 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1661179712767100002 Content-Type: text/plain; charset="utf-8" The support for the sheepdog storage backend will be dropped in the upcoming patches. Remove all the relevant tests. Signed-off-by: Peter Krempa --- tests/meson.build | 6 - tests/storagebackendsheepdogtest.c | 205 ------------------ tests/storagepoolxml2argvtest.c | 1 - tests/storagepoolxml2xmlin/pool-sheepdog.xml | 8 - tests/storagepoolxml2xmlout/pool-sheepdog.xml | 11 - tests/storagepoolxml2xmltest.c | 1 - tests/storagevolxml2xmlin/vol-sheepdog.xml | 10 - tests/storagevolxml2xmlout/vol-sheepdog.xml | 8 - tests/storagevolxml2xmltest.c | 1 - 9 files changed, 251 deletions(-) delete mode 100644 tests/storagebackendsheepdogtest.c delete mode 100644 tests/storagepoolxml2xmlin/pool-sheepdog.xml delete mode 100644 tests/storagepoolxml2xmlout/pool-sheepdog.xml delete mode 100644 tests/storagevolxml2xmlin/vol-sheepdog.xml delete mode 100644 tests/storagevolxml2xmlout/vol-sheepdog.xml diff --git a/tests/meson.build b/tests/meson.build index d6b1bb2bf0..2556b71444 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -509,12 +509,6 @@ if conf.has('WITH_STORAGE_FS') ] endif -if conf.has('WITH_STORAGE_SHEEPDOG') - tests +=3D [ - { 'name': 'storagebackendsheepdogtest', 'link_with': [ storage_driver_= impl_lib, storage_backend_sheepdog_priv_lib ] }, - ] -endif - if conf.has('WITH_VBOX') tests +=3D [ { 'name': 'vboxsnapshotxmltest', 'link_with': [ vbox_driver_impl ] }, diff --git a/tests/storagebackendsheepdogtest.c b/tests/storagebackendsheep= dogtest.c deleted file mode 100644 index 8f27e40d46..0000000000 --- a/tests/storagebackendsheepdogtest.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * storagebackendsheepdogtest.c: storage backend for Sheepdog handling - * - * Copyright (C) 2014 Red Hat, Inc. - * Copyright (C) 2012 Sebastian Wiedenroth - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * . - */ - -#include - -#include - -#include - -#include "internal.h" -#include "testutils.h" -#define LIBVIRT_STORAGE_BACKEND_SHEEPDOG_PRIV_H_ALLOW -#include "storage/storage_backend_sheepdog_priv.h" - -#define VIR_FROM_THIS VIR_FROM_NONE - -typedef struct { - const char *output; - int expected_return; - uint64_t expected_capacity; - uint64_t expected_allocation; -} collie_test; - -struct testNodeInfoParserData { - collie_test data; - const char *poolxml; -}; - -struct testVDIListParserData { - collie_test data; - const char *poolxml; - const char *volxml; -}; - - -static int -test_node_info_parser(const void *opaque) -{ - const struct testNodeInfoParserData *data =3D opaque; - collie_test test =3D data->data; - g_autofree char *output =3D NULL; - g_autoptr(virStoragePoolDef) pool =3D NULL; - - if (!(pool =3D virStoragePoolDefParseFile(data->poolxml))) - return -1; - - output =3D g_strdup(test.output); - - if (virStorageBackendSheepdogParseNodeInfo(pool, output) !=3D - test.expected_return) - return -1; - - if (test.expected_return) - return 0; - - if (pool->capacity =3D=3D test.expected_capacity && - pool->allocation =3D=3D test.expected_allocation) - return 0; - - return -1; -} - -static int -test_vdi_list_parser(const void *opaque) -{ - const struct testVDIListParserData *data =3D opaque; - collie_test test =3D data->data; - g_autofree char *output =3D NULL; - g_autoptr(virStoragePoolDef) pool =3D NULL; - g_autoptr(virStorageVolDef) vol =3D NULL; - - if (!(pool =3D virStoragePoolDefParseFile(data->poolxml))) - return -1; - - if (!(vol =3D virStorageVolDefParseFile(pool, data->volxml, 0))) - return -1; - - output =3D g_strdup(test.output); - - if (virStorageBackendSheepdogParseVdiList(vol, output) !=3D - test.expected_return) - return -1; - - if (test.expected_return) - return 0; - - if (vol->target.capacity =3D=3D test.expected_capacity && - vol->target.allocation =3D=3D test.expected_allocation) - return 0; - - return -1; -} - - -static int -mymain(void) -{ - int ret =3D 0; - g_autofree char *poolxml =3D NULL; - g_autofree char *volxml =3D NULL; - - collie_test node_info_tests[] =3D { - {"", -1, 0, 0}, - {"Total 15245667872 117571104 0% 20972341\n", 0, 15245667872, 1175= 71104}, - {"To", -1, 0, 0}, - {"asdf\nasdf", -1, 0, 0}, - {"Total ", -1, 0, 0}, - {"Total 1", -1, 0, 0}, - {"Total 1\n", -1, 0, 0}, - {"Total 1 ", -1, 0, 0}, - {"Total 1 2", -1, 0, 0}, - {"Total 1 2 ", -1, 0, 0}, - {"Total 1 2\n", 0, 1, 2}, - {"Total 1 2 \n", 0, 1, 2}, - {"Total a 2 \n", -1, 0, 0}, - {"Total 1 b \n", -1, 0, 0}, - {"Total a b \n", -1, 0, 0}, - {"stuff\nTotal 1 2 \n", 0, 1, 2}, - {"0 1 2 3\nTotal 1 2 \n", 0, 1, 2}, - {NULL, 0, 0, 0} - }; - - collie_test vdi_list_tests[] =3D { - {"", -1, 0, 0}, - {"=3D test 3 10 20 0 1336557216 7c2b27\n", 0, 10, 20}, - {"=3D test\\ with\\ spaces 3 10 20 0 1336557216 7c2b27\n", 0, 10, = 20}, - {"=3D backslashattheend\\\\ 3 10 20 0 1336557216 7c2b27\n", 0, 10,= 20}, - {"s test 1 10 20 0 1336556634 7c2b25\n=3D test 3 50 60 0 133655721= 6 7c2b27\n", 0, 50, 60}, - {"=3D", -1, 0, 0}, - {"=3D test", -1, 0, 0}, - {"=3D test ", -1, 0, 0}, - {"=3D test 1", -1, 0, 0}, - {"=3D test 1 ", -1, 0, 0}, - {"=3D test 1 2", -1, 0, 0}, - {"=3D test 1 2 ", -1, 0, 0}, - {"=3D test 1 2 3", -1, 0, 0}, - {NULL, 0, 0, 0} - }; - - collie_test *test =3D node_info_tests; - - poolxml =3D g_strdup_printf("%s/storagepoolxml2xmlin/pool-sheepdog.xml= ", - abs_srcdir); - - volxml =3D g_strdup_printf("%s/storagevolxml2xmlin/vol-sheepdog.xml", - abs_srcdir); - -#define DO_TEST_NODE(collie) \ - do { \ - struct testNodeInfoParserData data =3D { \ - .data =3D collie, \ - .poolxml =3D poolxml, \ - }; \ - if (virTestRun("node_info_parser", test_node_info_parser, \ - &data) < 0) \ - ret =3D -1; \ - } while (0) - - while (test->output !=3D NULL) { - DO_TEST_NODE(*test); - ++test; - } - - -#define DO_TEST_VDI(collie) \ - do { \ - struct testVDIListParserData data =3D { \ - .data =3D collie, \ - .poolxml =3D poolxml, \ - .volxml =3D volxml, \ - }; \ - if (virTestRun("vdi_list_parser", test_vdi_list_parser, \ - &data) < 0) \ - ret =3D -1; \ - } while (0) - - test =3D vdi_list_tests; - - while (test->output !=3D NULL) { - DO_TEST_VDI(*test); - ++test; - } - - return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; -} - -VIR_TEST_MAIN(mymain) diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtes= t.c index 487481b7ee..04ff45f98d 100644 --- a/tests/storagepoolxml2argvtest.c +++ b/tests/storagepoolxml2argvtest.c @@ -175,7 +175,6 @@ mymain(void) DO_TEST_FAIL("pool-mpath"); DO_TEST_FAIL("pool-iscsi-multiiqn"); DO_TEST_FAIL("pool-iscsi-vendor-product"); - DO_TEST_FAIL("pool-sheepdog"); DO_TEST_FAIL("pool-gluster"); DO_TEST_FAIL("pool-gluster-sub"); DO_TEST_FAIL("pool-scsi-type-scsi-host-stable"); diff --git a/tests/storagepoolxml2xmlin/pool-sheepdog.xml b/tests/storagepo= olxml2xmlin/pool-sheepdog.xml deleted file mode 100644 index 49b6baf014..0000000000 --- a/tests/storagepoolxml2xmlin/pool-sheepdog.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - sheepdog - - - 65fcba04-5b13-bd93-cff3-52ce48e11ad7 - sheepdog - diff --git a/tests/storagepoolxml2xmlout/pool-sheepdog.xml b/tests/storagep= oolxml2xmlout/pool-sheepdog.xml deleted file mode 100644 index 000c068677..0000000000 --- a/tests/storagepoolxml2xmlout/pool-sheepdog.xml +++ /dev/null @@ -1,11 +0,0 @@ - - sheepdog - 65fcba04-5b13-bd93-cff3-52ce48e11ad7 - 0 - 0 - 0 - - - sheepdog - - diff --git a/tests/storagepoolxml2xmltest.c b/tests/storagepoolxml2xmltest.c index 2bad858033..76d6f54b33 100644 --- a/tests/storagepoolxml2xmltest.c +++ b/tests/storagepoolxml2xmltest.c @@ -86,7 +86,6 @@ mymain(void) DO_TEST("pool-mpath"); DO_TEST("pool-iscsi-multiiqn"); DO_TEST("pool-iscsi-vendor-product"); - DO_TEST("pool-sheepdog"); DO_TEST("pool-gluster"); DO_TEST("pool-gluster-sub"); DO_TEST("pool-scsi-type-scsi-host-stable"); diff --git a/tests/storagevolxml2xmlin/vol-sheepdog.xml b/tests/storagevolx= ml2xmlin/vol-sheepdog.xml deleted file mode 100644 index d6e920bb81..0000000000 --- a/tests/storagevolxml2xmlin/vol-sheepdog.xml +++ /dev/null @@ -1,10 +0,0 @@ - - test2 - - - 1024 - 0 - - sheepdog:test2 - - diff --git a/tests/storagevolxml2xmlout/vol-sheepdog.xml b/tests/storagevol= xml2xmlout/vol-sheepdog.xml deleted file mode 100644 index 47fb8eb418..0000000000 --- a/tests/storagevolxml2xmlout/vol-sheepdog.xml +++ /dev/null @@ -1,8 +0,0 @@ - - test2 - 1024 - 0 - - sheepdog:test2 - - diff --git a/tests/storagevolxml2xmltest.c b/tests/storagevolxml2xmltest.c index 5d06821cd0..161cb7c6bc 100644 --- a/tests/storagevolxml2xmltest.c +++ b/tests/storagevolxml2xmltest.c @@ -92,7 +92,6 @@ mymain(void) DO_TEST("pool-disk", "vol-partition"); DO_TEST("pool-logical", "vol-logical"); DO_TEST("pool-logical", "vol-logical-backing"); - DO_TEST("pool-sheepdog", "vol-sheepdog"); DO_TEST("pool-gluster", "vol-gluster-dir"); DO_TEST("pool-gluster", "vol-gluster-dir-neg-uid"); DO_TEST_FULL("pool-dir", "vol-qcow2-nocapacity", --=20 2.37.1