[lxc-devel] [lxd/master] test/storage: add tests using btrfs on LVM and ceph volumes

albertodonato on Github lxc-bot at linuxcontainers.org
Mon Sep 25 15:55:31 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 361 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170925/f53f9092/attachment.bin>
-------------- next part --------------
From 11dbbe8153e4aa669e1f473b50d221f49fd4fd49 Mon Sep 17 00:00:00 2001
From: Alberto Donato <alberto.donato at canonical.com>
Date: Mon, 25 Sep 2017 11:54:53 -0400
Subject: [PATCH] test/storage: add tests using btrfs on LVM and ceph volumes

Signed-off-by: Alberto Donato <alberto.donato at canonical.com>
---
 test/suites/storage.sh             | 4 ++++
 test/suites/storage_driver_ceph.sh | 7 +++++++
 2 files changed, 11 insertions(+)

diff --git a/test/suites/storage.sh b/test/suites/storage.sh
index d3cc21bb7..e4561dbac 100644
--- a/test/suites/storage.sh
+++ b/test/suites/storage.sh
@@ -376,6 +376,9 @@ test_storage() {
       # Test that changing block filesystem works
       lxc storage set "lxdtest-$(basename "${LXD_DIR}")-pool6" volume.block.filesystem xfs
       lxc init testimage c1pool6 -s "lxdtest-$(basename "${LXD_DIR}")-pool6"
+      lxc storage set "lxdtest-$(basename "${LXD_DIR}")-pool6" volume.block.filesystem btrfs
+      lxc storage set "lxdtest-$(basename "${LXD_DIR}")-pool6" volume.size 100MB
+      lxc init testimage c2pool6 -s "lxdtest-$(basename "${LXD_DIR}")-pool6"
 
       lxc storage volume create "lxdtest-$(basename "${LXD_DIR}")-pool6" c10pool6
       lxc storage volume attach "lxdtest-$(basename "${LXD_DIR}")-pool6" c10pool6 c10pool6 testDevice /opt
@@ -567,6 +570,7 @@ test_storage() {
 
     if [ "$lxd_backend" = "lvm" ]; then
       lxc delete -f c1pool6
+      lxc delete -f c2pool6
       lxc delete -f c10pool6
       lxc delete -f c12pool6
 
diff --git a/test/suites/storage_driver_ceph.sh b/test/suites/storage_driver_ceph.sh
index 1bc216f34..b6006cae3 100644
--- a/test/suites/storage_driver_ceph.sh
+++ b/test/suites/storage_driver_ceph.sh
@@ -60,6 +60,12 @@ test_storage_driver_ceph() {
     # ag{count,size} parameters wrong and/or sets the data area too big.
     lxc storage set "lxdtest-$(basename "${LXD_DIR}")-pool1" volume.size 50MB
     lxc init testimage c5pool1 -s "lxdtest-$(basename "${LXD_DIR}")-pool1"
+    # Test btrfs as volume filesystem
+    lxc storage set "lxdtest-$(basename "${LXD_DIR}")-pool1" volume.block.filesystem btrfs
+    # btrfs needs bigger minimum size
+    lxc storage set "lxdtest-$(basename "${LXD_DIR}")-pool1" volume.size 100MB
+    lxc init testimage c6pool1 -s "lxdtest-$(basename "${LXD_DIR}")-pool1"    
+
 
     # Test whether dependency tracking is working correctly. We should be able
     # to create a container, copy it, which leads to a dependency relation
@@ -114,6 +120,7 @@ test_storage_driver_ceph() {
     lxc delete -f c1pool1
     lxc delete -f c3pool1
     lxc delete -f c5pool1
+    lxc delete -f c6pool1
 
     lxc delete -f c4pool2
     lxc delete -f c2pool2


More information about the lxc-devel mailing list