Blame 0005-Add-workarounds-for-some-LVM-test-issues.patch

Vojtech Trefny 3d6d37
From 7c31cc534f96766dd2e3427b09d0affca66b0745 Mon Sep 17 00:00:00 2001
Vojtech Trefny 3d6d37
From: Vojtech Trefny <vtrefny@redhat.com>
Vojtech Trefny 3d6d37
Date: Tue, 23 Mar 2021 13:54:02 +0100
Vojtech Trefny 3d6d37
Subject: [PATCH 1/3] tests: Do not try to remove VG before removing the VDO
Vojtech Trefny 3d6d37
 pool
Vojtech Trefny 3d6d37
Vojtech Trefny 3d6d37
---
Vojtech Trefny 3d6d37
 tests/lvm_dbus_tests.py | 6 +++---
Vojtech Trefny 3d6d37
 tests/lvm_test.py       | 6 +++---
Vojtech Trefny 3d6d37
 2 files changed, 6 insertions(+), 6 deletions(-)
Vojtech Trefny 3d6d37
Vojtech Trefny 3d6d37
diff --git a/tests/lvm_dbus_tests.py b/tests/lvm_dbus_tests.py
Vojtech Trefny 3d6d37
index 8f2bb95d..b599fdd0 100644
Vojtech Trefny 3d6d37
--- a/tests/lvm_dbus_tests.py
Vojtech Trefny 3d6d37
+++ b/tests/lvm_dbus_tests.py
Vojtech Trefny 3d6d37
@@ -1517,14 +1517,14 @@ def setUp(self):
Vojtech Trefny 3d6d37
         self.assertTrue(succ)
Vojtech Trefny 3d6d37
 
Vojtech Trefny 3d6d37
     def _clean_up(self):
Vojtech Trefny 3d6d37
-        BlockDev.lvm_vgremove("testVDOVG")
Vojtech Trefny 3d6d37
-        BlockDev.lvm_pvremove(self.loop_dev)
Vojtech Trefny 3d6d37
-
Vojtech Trefny 3d6d37
         try:
Vojtech Trefny 3d6d37
             BlockDev.lvm_lvremove("testVDOVG", "vdoPool", True, None)
Vojtech Trefny 3d6d37
         except:
Vojtech Trefny 3d6d37
             pass
Vojtech Trefny 3d6d37
 
Vojtech Trefny 3d6d37
+        BlockDev.lvm_vgremove("testVDOVG")
Vojtech Trefny 3d6d37
+        BlockDev.lvm_pvremove(self.loop_dev)
Vojtech Trefny 3d6d37
+
Vojtech Trefny 3d6d37
         try:
Vojtech Trefny 3d6d37
             delete_lio_device(self.loop_dev)
Vojtech Trefny 3d6d37
         except RuntimeError:
Vojtech Trefny 3d6d37
diff --git a/tests/lvm_test.py b/tests/lvm_test.py
Vojtech Trefny 3d6d37
index 6f80a3ba..6c04faf9 100644
Vojtech Trefny 3d6d37
--- a/tests/lvm_test.py
Vojtech Trefny 3d6d37
+++ b/tests/lvm_test.py
Vojtech Trefny 3d6d37
@@ -1437,14 +1437,14 @@ def setUp(self):
Vojtech Trefny 3d6d37
         self.assertTrue(succ)
Vojtech Trefny 3d6d37
 
Vojtech Trefny 3d6d37
     def _clean_up(self):
Vojtech Trefny 3d6d37
-        BlockDev.lvm_vgremove("testVDOVG")
Vojtech Trefny 3d6d37
-        BlockDev.lvm_pvremove(self.loop_dev)
Vojtech Trefny 3d6d37
-
Vojtech Trefny 3d6d37
         try:
Vojtech Trefny 3d6d37
             BlockDev.lvm_lvremove("testVDOVG", "vdoPool", True, None)
Vojtech Trefny 3d6d37
         except:
Vojtech Trefny 3d6d37
             pass
Vojtech Trefny 3d6d37
 
Vojtech Trefny 3d6d37
+        BlockDev.lvm_vgremove("testVDOVG")
Vojtech Trefny 3d6d37
+        BlockDev.lvm_pvremove(self.loop_dev)
Vojtech Trefny 3d6d37
+
Vojtech Trefny 3d6d37
         try:
Vojtech Trefny 3d6d37
             delete_lio_device(self.loop_dev)
Vojtech Trefny 3d6d37
         except RuntimeError:
Vojtech Trefny 3d6d37
Vojtech Trefny 3d6d37
From 41b9d745b8c1a33221e15683f390bae180d1e960 Mon Sep 17 00:00:00 2001
Vojtech Trefny 3d6d37
From: Vojtech Trefny <vtrefny@redhat.com>
Vojtech Trefny 3d6d37
Date: Tue, 23 Mar 2021 13:59:24 +0100
Vojtech Trefny 3d6d37
Subject: [PATCH 2/3] tests: Force remove LVM VG /dev/ entry not removed by
Vojtech Trefny 3d6d37
 vgremove
Vojtech Trefny 3d6d37
Vojtech Trefny 3d6d37
The directory is sometimes not removed. This is a known bug that
Vojtech Trefny 3d6d37
causes subsequent test cases to fail.
Vojtech Trefny 3d6d37
---
Vojtech Trefny 3d6d37
 tests/lvm_dbus_tests.py | 6 ++++++
Vojtech Trefny 3d6d37
 tests/lvm_test.py       | 6 ++++++
Vojtech Trefny 3d6d37
 2 files changed, 12 insertions(+)
Vojtech Trefny 3d6d37
Vojtech Trefny 3d6d37
diff --git a/tests/lvm_dbus_tests.py b/tests/lvm_dbus_tests.py
Vojtech Trefny 3d6d37
index b599fdd0..3278716e 100644
Vojtech Trefny 3d6d37
--- a/tests/lvm_dbus_tests.py
Vojtech Trefny 3d6d37
+++ b/tests/lvm_dbus_tests.py
Vojtech Trefny 3d6d37
@@ -399,6 +399,9 @@ def _clean_up(self):
Vojtech Trefny 3d6d37
         except:
Vojtech Trefny 3d6d37
             pass
Vojtech Trefny 3d6d37
 
Vojtech Trefny 3d6d37
+        # XXX remove lingering /dev entries
Vojtech Trefny 3d6d37
+        shutil.rmtree("/dev/testVG", ignore_errors=True)
Vojtech Trefny 3d6d37
+
Vojtech Trefny 3d6d37
         LvmPVonlyTestCase._clean_up(self)
Vojtech Trefny 3d6d37
 
Vojtech Trefny 3d6d37
 @unittest.skipUnless(lvm_dbus_running, "LVM DBus not running")
Vojtech Trefny 3d6d37
@@ -1525,6 +1528,9 @@ def _clean_up(self):
Vojtech Trefny 3d6d37
         BlockDev.lvm_vgremove("testVDOVG")
Vojtech Trefny 3d6d37
         BlockDev.lvm_pvremove(self.loop_dev)
Vojtech Trefny 3d6d37
 
Vojtech Trefny 3d6d37
+        # XXX remove lingering /dev entries
Vojtech Trefny 3d6d37
+        shutil.rmtree("/dev/testVDOVG", ignore_errors=True)
Vojtech Trefny 3d6d37
+
Vojtech Trefny 3d6d37
         try:
Vojtech Trefny 3d6d37
             delete_lio_device(self.loop_dev)
Vojtech Trefny 3d6d37
         except RuntimeError:
Vojtech Trefny 3d6d37
diff --git a/tests/lvm_test.py b/tests/lvm_test.py
Vojtech Trefny 3d6d37
index 6c04faf9..d7e1f84c 100644
Vojtech Trefny 3d6d37
--- a/tests/lvm_test.py
Vojtech Trefny 3d6d37
+++ b/tests/lvm_test.py
Vojtech Trefny 3d6d37
@@ -378,6 +378,9 @@ def _clean_up(self):
Vojtech Trefny 3d6d37
         except:
Vojtech Trefny 3d6d37
             pass
Vojtech Trefny 3d6d37
 
Vojtech Trefny 3d6d37
+        # XXX remove lingering /dev entries
Vojtech Trefny 3d6d37
+        shutil.rmtree("/dev/testVG", ignore_errors=True)
Vojtech Trefny 3d6d37
+
Vojtech Trefny 3d6d37
         LvmPVonlyTestCase._clean_up(self)
Vojtech Trefny 3d6d37
 
Vojtech Trefny 3d6d37
 class LvmTestVGcreateRemove(LvmPVVGTestCase):
Vojtech Trefny 3d6d37
@@ -1445,6 +1448,9 @@ def _clean_up(self):
Vojtech Trefny 3d6d37
         BlockDev.lvm_vgremove("testVDOVG")
Vojtech Trefny 3d6d37
         BlockDev.lvm_pvremove(self.loop_dev)
Vojtech Trefny 3d6d37
 
Vojtech Trefny 3d6d37
+        # XXX remove lingering /dev entries
Vojtech Trefny 3d6d37
+        shutil.rmtree("/dev/testVDOVG", ignore_errors=True)
Vojtech Trefny 3d6d37
+
Vojtech Trefny 3d6d37
         try:
Vojtech Trefny 3d6d37
             delete_lio_device(self.loop_dev)
Vojtech Trefny 3d6d37
         except RuntimeError:
Vojtech Trefny 3d6d37
Vojtech Trefny 3d6d37
From 4ecf0075cedf3a1d275d34b94ce5bb512c4e970e Mon Sep 17 00:00:00 2001
Vojtech Trefny 3d6d37
From: Vojtech Trefny <vtrefny@redhat.com>
Vojtech Trefny 3d6d37
Date: Tue, 23 Mar 2021 14:03:44 +0100
Vojtech Trefny 3d6d37
Subject: [PATCH 3/3] tests: Tag LvmPVVGLVcachePoolCreateRemoveTestCase as
Vojtech Trefny 3d6d37
 unstable
Vojtech Trefny 3d6d37
Vojtech Trefny 3d6d37
LVM randomly fails to activate the newly created metadata LV.
Vojtech Trefny 3d6d37
Issue is reported to LVM and not yet fixed.
Vojtech Trefny 3d6d37
---
Vojtech Trefny 3d6d37
 tests/lvm_dbus_tests.py | 2 +-
Vojtech Trefny 3d6d37
 tests/lvm_test.py       | 2 +-
Vojtech Trefny 3d6d37
 2 files changed, 2 insertions(+), 2 deletions(-)
Vojtech Trefny 3d6d37
Vojtech Trefny 3d6d37
diff --git a/tests/lvm_dbus_tests.py b/tests/lvm_dbus_tests.py
Vojtech Trefny 3d6d37
index 3278716e..4882da88 100644
Vojtech Trefny 3d6d37
--- a/tests/lvm_dbus_tests.py
Vojtech Trefny 3d6d37
+++ b/tests/lvm_dbus_tests.py
Vojtech Trefny 3d6d37
@@ -1213,7 +1213,7 @@ def _clean_up(self):
Vojtech Trefny 3d6d37
 
Vojtech Trefny 3d6d37
 @unittest.skipUnless(lvm_dbus_running, "LVM DBus not running")
Vojtech Trefny 3d6d37
 class LvmPVVGLVcachePoolCreateRemoveTestCase(LvmPVVGLVcachePoolTestCase):
Vojtech Trefny 3d6d37
-    @tag_test(TestTags.SLOW)
Vojtech Trefny 3d6d37
+    @tag_test(TestTags.SLOW, TestTags.UNSTABLE)
Vojtech Trefny 3d6d37
     def test_cache_pool_create_remove(self):
Vojtech Trefny 3d6d37
         """Verify that is it possible to create and remove a cache pool"""
Vojtech Trefny 3d6d37
 
Vojtech Trefny 3d6d37
diff --git a/tests/lvm_test.py b/tests/lvm_test.py
Vojtech Trefny 3d6d37
index d7e1f84c..eb94c917 100644
Vojtech Trefny 3d6d37
--- a/tests/lvm_test.py
Vojtech Trefny 3d6d37
+++ b/tests/lvm_test.py
Vojtech Trefny 3d6d37
@@ -1129,7 +1129,7 @@ def _clean_up(self):
Vojtech Trefny 3d6d37
         LvmPVVGLVTestCase._clean_up(self)
Vojtech Trefny 3d6d37
 
Vojtech Trefny 3d6d37
 class LvmPVVGLVcachePoolCreateRemoveTestCase(LvmPVVGLVcachePoolTestCase):
Vojtech Trefny 3d6d37
-    @tag_test(TestTags.SLOW)
Vojtech Trefny 3d6d37
+    @tag_test(TestTags.SLOW, TestTags.UNSTABLE)
Vojtech Trefny 3d6d37
     def test_cache_pool_create_remove(self):
Vojtech Trefny 3d6d37
         """Verify that is it possible to create and remove a cache pool"""
Vojtech Trefny 3d6d37