summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2015-08-05 18:44:45 +0200
committeranonym <anonym@riseup.net>2015-08-05 18:46:30 +0200
commitcd2e6154db1c4b492476417f7f5c87eda9174c39 (patch)
tree1fd98931407c7119783556d86fc7ad360be202db
parent653836b1cc80db256dcd1370b72b0cd8f73b430f (diff)
Fix test broken by our AppArmor alias for /live/overlay.
Due to the alias, /live/overlay will be treated as /lib/live/mount/overlay.
-rw-r--r--features/evince.feature8
-rw-r--r--features/step_definitions/common_steps.rb5
-rw-r--r--features/torified_browsing.feature8
-rw-r--r--features/totem.feature8
4 files changed, 23 insertions, 6 deletions
diff --git a/features/evince.feature b/features/evince.feature
index a2d941e..ed87012 100644
--- a/features/evince.feature
+++ b/features/evince.feature
@@ -35,10 +35,14 @@ Feature: Using Evince
Then I see "EvinceUnableToOpen.png" after at most 10 seconds
And AppArmor has denied "/usr/bin/evince" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/default-testpage.pdf"
When I close Evince
- Given AppArmor has not denied "/usr/bin/evince" from opening "/live/overlay/home/amnesia/.gnupg/default-testpage.pdf"
+ # Due to our AppArmor rewriting rules, /live/overlay will be treated
+ # as /lib/live/mount/overlay. We have to clear syslog we'll look for
+ # the same entry as above again.
+ Given I clear syslog
+ And AppArmor has not denied "/usr/bin/evince" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/default-testpage.pdf"
When I try to open "/live/overlay/home/amnesia/.gnupg/default-testpage.pdf" with Evince
Then I see "EvinceUnableToOpen.png" after at most 10 seconds
- And AppArmor has denied "/usr/bin/evince" from opening "/live/overlay/home/amnesia/.gnupg/default-testpage.pdf"
+ And AppArmor has denied "/usr/bin/evince" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/default-testpage.pdf"
@keep_volumes
Scenario: Installing Tails on a USB drive, creating a persistent partition, copying PDF files to it
diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb
index 069a14b..2f0bd39 100644
--- a/features/step_definitions/common_steps.rb
+++ b/features/step_definitions/common_steps.rb
@@ -1120,6 +1120,11 @@ Given /^I wait (?:between (\d+) and )?(\d+) seconds$/ do |min, max|
sleep(time)
end
+Given /^I clear syslog$/ do
+ next if @skip_steps_while_restoring_background
+ @vm.execute_successfully('echo > /var/log/syslog')
+end
+
When /^AppArmor has (not )?denied "([^"]+)" from opening "([^"]+)"(?: after at most (\d+) seconds)?$/ do |anti_test, profile, file, time|
next if @skip_steps_while_restoring_background
expected_cmd_status = anti_test ? false : true
diff --git a/features/torified_browsing.feature b/features/torified_browsing.feature
index 0c8a668..1f67ee4 100644
--- a/features/torified_browsing.feature
+++ b/features/torified_browsing.feature
@@ -83,10 +83,14 @@ Feature: Browsing the web using the Tor Browser
When I open the address "file:///lib/live/mount/overlay/home/amnesia/.gnupg/synaptic.html" in the Tor Browser
Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
And AppArmor has denied "/usr/local/lib/tor-browser/firefox" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/synaptic.html"
- Given AppArmor has not denied "/usr/local/lib/tor-browser/firefox" from opening "/live/overlay/home/amnesia/.gnupg/synaptic.html"
+ # Due to our AppArmor rewriting rules, /live/overlay will be treated
+ # as /lib/live/mount/overlay. We have to clear syslog we'll look for
+ # the same entry as above again.
+ And I clear syslog
+ Given AppArmor has not denied "/usr/local/lib/tor-browser/firefox" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/synaptic.html"
When I open the address "file:///live/overlay/home/amnesia/.gnupg/synaptic.html" in the Tor Browser
Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
- And AppArmor has denied "/usr/local/lib/tor-browser/firefox" from opening "/live/overlay/home/amnesia/.gnupg/synaptic.html"
+ And AppArmor has denied "/usr/local/lib/tor-browser/firefox" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/synaptic.html"
# We do not get any AppArmor log for when access to files in /tmp is denied
# since we explictly override (commit 51c0060) the rules (from the user-tmp
# abstration) that would otherwise allow it, and we do so with "deny", which
diff --git a/features/totem.feature b/features/totem.feature
index b2d6f4e..9d7e84c 100644
--- a/features/totem.feature
+++ b/features/totem.feature
@@ -36,10 +36,14 @@ Feature: Using Totem
And AppArmor has denied "/usr/bin/totem" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/video.mp4"
Given I close Totem
And the file "/live/overlay/home/amnesia/.gnupg/video.mp4" exists
- And AppArmor has not denied "/usr/bin/totem" from opening "/live/overlay/home/amnesia/.gnupg/video.mp4"
+ # Due to our AppArmor rewriting rules, /live/overlay will be treated
+ # as /lib/live/mount/overlay. We have to clear syslog we'll look for
+ # the same entry as above again.
+ And I clear syslog
+ And AppArmor has not denied "/usr/bin/totem" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/video.mp4"
When I try to open "/live/overlay/home/amnesia/.gnupg/video.mp4" with Totem
Then I see "TotemUnableToOpen.png" after at most 10 seconds
- And AppArmor has denied "/usr/bin/totem" from opening "/live/overlay/home/amnesia/.gnupg/video.mp4"
+ And AppArmor has denied "/usr/bin/totem" from opening "/lib/live/mount/overlay/home/amnesia/.gnupg/video.mp4"
@check_tor_leaks
Scenario: Watching a WebM video over HTTPS, with and without the command-line