summaryrefslogtreecommitdiffstats
path: root/features/step_definitions/common_steps.rb
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2015-02-06 17:36:11 +0100
committerTails developers <amnesia@boum.org>2015-02-06 17:36:11 +0100
commitae46105554b93b15549f76add14756bf38fbeaa1 (patch)
tree07c787a288c8595ba47d5c589636e35ab1fd1484 /features/step_definitions/common_steps.rb
parentf48617c4f67ec264b6cdd4b2cff5b3b4b62d1f63 (diff)
Set network state according to the background when restoring from snapshots.
This makes sense for keeping the state (of the network's "plugged" state) after restoring from a snapshot consistent with the one before, especially since new VM instances always start with the network plugged -- if "the network is unplugged" is in the background, the network will suddenly be plugged after resotring from the background snapshot. In fact after the VMNet split (out of VM) seems to expose this issue: when restoring from a snapshot where the network is unplugged, and then plugging the network, I get 1 minute delay and errors like "device not ready (errno=-16), forcing hardreset" in dmesg. That these strange things didn't happen before the VMNet split is probably just a coincidence, some how.
Diffstat (limited to 'features/step_definitions/common_steps.rb')
-rw-r--r--features/step_definitions/common_steps.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb
index be12e90..811a2a1 100644
--- a/features/step_definitions/common_steps.rb
+++ b/features/step_definitions/common_steps.rb
@@ -102,12 +102,14 @@ Then /^drive "([^"]+)" is detected by Tails$/ do |name|
end
Given /^the network is plugged$/ do
- next if @skip_steps_while_restoring_background
+ # We don't skip this step when restoring the background to ensure
+ # that the network state is actually the same after restoring as
+ # when the snapshot was made.
@vm.plug_network
end
Given /^the network is unplugged$/ do
- next if @skip_steps_while_restoring_background
+ # See comment in the step "the network is plugged".
@vm.unplug_network
end