tests: fix removing LVM volumes
VM volumes have 'vm-' name prefix now.
This is continuation of fd5386c
storage/lvm: prefix VM LVM volumes with 'vm-'
This commit is contained in:
parent
75394a1348
commit
a8e2f3111d
@ -756,11 +756,11 @@ class SystemTestCase(QubesTestCase):
|
|||||||
volumes = subprocess.check_output(
|
volumes = subprocess.check_output(
|
||||||
['sudo', 'lvs', '--noheadings', '-o', 'vg_name,name',
|
['sudo', 'lvs', '--noheadings', '-o', 'vg_name,name',
|
||||||
'--separator', '/']).decode()
|
'--separator', '/']).decode()
|
||||||
if ('/' + prefix) not in volumes:
|
if ('/vm-' + prefix) not in volumes:
|
||||||
return
|
return
|
||||||
subprocess.check_call(['sudo', 'lvremove', '-f'] +
|
subprocess.check_call(['sudo', 'lvremove', '-f'] +
|
||||||
[vol.strip() for vol in volumes.splitlines()
|
[vol.strip() for vol in volumes.splitlines()
|
||||||
if ('/' + prefix) in vol],
|
if ('/vm-' + prefix) in vol],
|
||||||
stdout=subprocess.DEVNULL)
|
stdout=subprocess.DEVNULL)
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user