Commit ad6669b7 authored by intrigeri's avatar intrigeri
Browse files

Optimize memory erasure anti-test: block the boot to save CPU on the host.

parent 87b8e919
......@@ -17,6 +17,7 @@ Feature: System memory erasure on shutdown
And udev-watchdog is monitoring the correct device
When I fill the guest's memory with a known pattern without verifying
And I reboot without wiping the memory
And I stop the boot at the bootloader menu
Then I find many patterns in the guest's memory
Scenario: Memory erasure on a modern computer
......@@ -47,6 +48,7 @@ Feature: System memory erasure on shutdown
And udev-watchdog is monitoring the correct device
When I fill the guest's memory with a known pattern without verifying
And I reboot without wiping the memory
And I stop the boot at the bootloader menu
Then I find many patterns in the guest's memory
Scenario: Memory erasure on an old computer
......
......@@ -255,20 +255,29 @@ When /^I destroy the computer$/ do
$vm.destroy_and_undefine
end
Given /^the computer (re)?boots Tails$/ do |reboot|
boot_timeout = 30
# We need some extra time for memory wiping if rebooting
boot_timeout += 90 if reboot
def bootsplash
case @os_loader
when "UEFI"
'TailsBootSplashUEFI.png'
else
'TailsBootSplash.png'
end
end
def bootsplash_tab_msg
case @os_loader
when "UEFI"
bootsplash = 'TailsBootSplashUEFI.png'
bootsplash_tab_msg = 'TailsBootSplashTabMsgUEFI.png'
'TailsBootSplashTabMsgUEFI.png'
else
bootsplash = 'TailsBootSplash.png'
bootsplash_tab_msg = 'TailsBootSplashTabMsg.png'
'TailsBootSplashTabMsg.png'
end
end
Given /^the computer (re)?boots Tails$/ do |reboot|
boot_timeout = 30
# We need some extra time for memory wiping if rebooting
boot_timeout += 90 if reboot
@screen.wait(bootsplash, boot_timeout)
@screen.wait(bootsplash_tab_msg, 10)
......
......@@ -197,7 +197,13 @@ end
When /^I reboot without wiping the memory$/ do
$vm.reset
@screen.wait('TailsBootSplash.png', 30)
end
When /^I stop the boot at the bootloader menu$/ do
@screen.wait(bootsplash, 90)
@screen.wait(bootsplash_tab_msg, 10)
@screen.type(Sikuli::Key.TAB)
@screen.waitVanish(bootsplash_tab_msg, 1)
end
When /^I shutdown and wait for Tails to finish wiping the memory$/ do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment