From d2585aa87126e61f694d856f5635b4f4ed64b24a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 11 Nov 2018 01:22:46 +0100 Subject: [PATCH] tests/lvm: fix checking lvm pool existence cont. Commit 15cf593bc56f9fdd2b433738254c3fe692f5b982 "tests/lvm: fix checking lvm pool existence" attempted to fix handling '-' in pool name by using /dev/VG/LV symlink. But those are not created for thin pools. Change back to /dev/mapper, but include '-' mangling. Related QubesOS/qubes-issues#4332 --- qubes/tests/storage_lvm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qubes/tests/storage_lvm.py b/qubes/tests/storage_lvm.py index 82ef3c46..369e45ce 100644 --- a/qubes/tests/storage_lvm.py +++ b/qubes/tests/storage_lvm.py @@ -42,7 +42,9 @@ else: def lvm_pool_exists(volume_group, thin_pool): ''' Returns ``True`` if thin pool exists in the volume group. ''' - path = "/dev/{!s}/{!s}".format(volume_group, thin_pool) + path = "/dev/mapper/{!s}-{!s}".format( + volume_group.replace('-', '--'), + thin_pool.replace('-', '--')) return os.path.exists(path)