summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril Brulebois <ckb@riseup.net>2019-04-03 18:13:04 +0200
committerCyril Brulebois <ckb@riseup.net>2019-04-04 10:50:32 +0200
commit16b0f1c5a97128fd4380e240f7f4441b2f804c70 (patch)
tree8f6ffb9fd4571d6616781f75966a5489fc4653e9
parentdf1248dfdee10c9b688d852f5d36a0d16e256133 (diff)
Test suite: ensure persistence partition is LUKS 2 (refs: #15450).wip/feature/15450-switch-to-luks2
-rw-r--r--features/step_definitions/usb.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/features/step_definitions/usb.rb b/features/step_definitions/usb.rb
index 7a8306d..ec563fd 100644
--- a/features/step_definitions/usb.rb
+++ b/features/step_definitions/usb.rb
@@ -379,6 +379,11 @@ Then /^a Tails persistence partition exists on USB drive "([^"]+)"$/ do |name|
luks_dev = "/dev/mapper/#{name}"
end
+ # Check LUKS1 vs. LUKS2:
+ luks_info = $vm.execute("cryptsetup status #{luks_dev}").stdout
+ assert(luks_info.match("^ +type: +LUKS2$"),
+ "Device #{luks_dev} doesn't appear to be LUKS2")
+
# Adapting check_part_integrity() seems like a bad idea so here goes
info = $vm.execute("udisksctl info --block-device '#{luks_dev}'").stdout
assert info.match("^ CryptoBackingDevice: +'/[a-zA-Z0-9_/]+'$")