apparmor denial during test runs for /home/phablet/autopilot/fakeenv/*/.cache/QML/

Bug #1379488 reported by Nicholas Skaggs
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Autopilot
Triaged
Undecided
Unassigned
Ubuntu Calculator App
Fix Released
Undecided
Unassigned
Ubuntu Calendar App
Triaged
Medium
Unassigned
Ubuntu Music App
New
Undecided
Unassigned
dbus-property-service (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Due to changes to support precompilation for qml applications, apparmor requires additional policy and directory setup to support the fakeenv environment. Affected application's autopilot tests will see errors similar to

apparmor="DENIED" operation="mkdir"
profile="com.ubuntu.calculator_calculator_1.3.329" name="/home/phablet/autopilot/fakeenv/tmpubm41n4c/.cache/QML/" pid=10637 comm="qmlscene"
requested_mask="c" denied_mask="c" fsuid=32011 ouid=32011

in there log.

Related branches

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-calculator-app at revision 333, scheduled for release in ubuntu-calculator-app, milestone 1.6

Changed in ubuntu-calculator-app:
status: New → Fix Committed
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

The suggested fix by Jamie didn't work in preliminary testing. That said due to the difficulties of releasing autopilot and maintaining these rules (see https://bugs.launchpad.net/ubuntu-app-launch/+bug/1376423), I feel it would be better to workaround them by dropping mocking support on the device and requiring the test runner to setup a clean environment. This assumption should work fine in CI as images are flash at the beginning of each test run.

By dropping mocking support, we don't use the fakeenv and thus these rules are not invoked (and therefore won't cause apparmor denials). See the MP for calculator as an example.

Changed in autopilot:
status: New → Fix Released
status: Fix Released → Triaged
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

The click.rules file which used to exist in autopilot have moved. Once https://bugs.launchpad.net/ubuntu-app-launch/+bug/1376423 lands these rules should be cleaned up and removed. Until the proposed solution is implemented and then adopted by the tests in question, these apparmor denials will exist if the testcase utilizes the provided apparmor fakeenv setup.

affects: dbus-property-service → dbus-property-service (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dbus-property-service (Ubuntu):
status: New → Confirmed
Changed in ubuntu-calculator-app:
status: Fix Committed → Fix Released
Bill Filler (bfiller)
Changed in ubuntu-calendar-app:
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.