Commit 1e6e7748 authored by kytv's avatar kytv
Browse files

Test that the hardware clock is not set when Tails shuts down

parent 5f6065d9
......@@ -62,3 +62,12 @@ Then /^the system clock is just past Tails' build date$/ do
"The system time (#{system_time}) is more than #{max_diff} seconds " +
"past the build date (#{build_time})")
Then /^the hardware clock was not updated when Tails shut down$/ do
host_time_str = cmd_helper(["date", "--rfc-2822"]).to_s
host_time = Time.rfc2822(host_time_str).to_time
hwclock_time_str = @vm.execute('hwclock -r').stdout.chomp
hwclock_time = DateTime.parse(hwclock_time_str).to_time
diff = (hwclock_time - host_time).abs
assert(diff <= max_time_drift)
......@@ -32,6 +32,12 @@ Feature: Time syncing
And Tor is ready
Then Tails clock is less than 5 minutes incorrect
Scenario: The system time is not synced to the hardware clock
When I bump the system time with "-15 days"
And I warm reboot the computer
And the computer reboots Tails
Then the hardware clock was not updated when Tails shut down
# Scenario: Clock vs Tor consensus' valid-{after,until} etc.
Scenario: Create a new snapshot to the same state (w.r.t. Sikuli steps) as the Background except we're now in bridge mode
Supports Markdown
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