3 Feature: Emergency shutdown
5 when I unplug my Tails device to trigger emergency shutdown
6 I want the system memory to be free from sensitive data.
8 # Test something close to real-world usage, without interfering,
9 # i.e. without the "I prepare Tails for memory erasure tests" step;
10 # and test that Tails eventually shuts down, which we don't do in
11 # the following scenarios for test suite performance reasons.
12 Scenario: Tails shuts down on DVD boot medium removal
13 Given I have started Tails from DVD and logged in and the network is connected
14 When I eject the boot medium
15 Then Tails eventually shuts down
17 Scenario: Tails erases memory on DVD boot medium removal: overlayfs read-write branch
18 Given I have started Tails from DVD without network and logged in
19 And I prepare Tails for memory erasure tests
20 And I fill a 128 MiB file with a known pattern on the root filesystem
21 And patterns cover at least 128 MiB in the guest's memory
22 When I eject the boot medium
23 And I wait for Tails to finish wiping the memory
24 Then I find very few patterns in the guest's memory
26 Scenario: Tails erases memory on DVD boot medium removal: vfat
27 Given I have started Tails from DVD without network and logged in
28 And I prepare Tails for memory erasure tests
29 And I plug and mount a 128 MiB USB drive with a vfat filesystem
30 And I fill the USB drive with a known pattern
31 And I read the content of the test FS
32 And patterns cover at least 99% of the test FS size in the guest's memory
33 When I eject the boot medium
34 And I wait for Tails to finish wiping the memory
35 Then I find very few patterns in the guest's memory
37 Scenario: Tails erases memory on DVD boot medium removal: LUKS-encrypted ext4
38 Given I have started Tails from DVD without network and logged in
39 And I prepare Tails for memory erasure tests
40 And I plug and mount a 128 MiB USB drive with an ext4 filesystem encrypted with password "asdf"
41 And I fill the USB drive with a known pattern
42 And I read the content of the test FS
43 And patterns cover at least 99% of the test FS size in the guest's memory
44 When I eject the boot medium
45 And I wait for Tails to finish wiping the memory
46 Then I find very few patterns in the guest's memory
48 Scenario: Tails erases memory and shuts down on USB boot medium removal: persistent data
49 Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
50 And I prepare Tails for memory erasure tests
51 And I fill a 128 MiB file with a known pattern on the persistent filesystem
52 And patterns cover at least 128 MiB in the guest's memory
53 When I eject the boot medium
54 And I wait for Tails to finish wiping the memory
55 Then I find very few patterns in the guest's memory
56 And Tails eventually shuts down