Audio playback tests fail due to permissions issue

Bug #1316312 reported by Chris Gregan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Driver Test Suite
Fix Released
High
Daniel Manrique
Checkbox Support Library
Fix Released
High
Daniel Manrique

Bug Description

Build Version/Date: 1.9
Environment used for testing: Trusty

Summary:
Several audio playback tests fail due to "ERROR:Failed to save active profiles information: [error 13] Permission denied:'active_profiles'

Steps to Reproduce:
1) run balance_internal_speaker, playback_hdmi, playback_displayport

Related branches

Chris Gregan (cgregan)
Changed in cdts:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Daniel Manrique (roadmr)
Revision history for this message
Daniel Manrique (roadmr) wrote :

Here's complete output from one of the tests (playback_hdmi):

INFO:===========================[ Saving audio settings ]============================ ERROR:Failed to save active profiles information: [Errno 13] Permission denied: 'active_profiles' ERROR:No available port found ERROR:Failed to find status for device: hdmi Attempting to initialize Gstreamer pipeline: audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! autoaudiosink Pipeline initialized, now starting playback. INFO:==========================[ Restoring audio settings ]==========================

Revision history for this message
Daniel Manrique (roadmr) wrote :

Interestingly, this failure comes from checkbox_support, where the bulk of the audio_settings.py script lives.

there are two places in that script where we do stuff like open('active_profiles'), but the PWD for the script is root (/), so when running as a normal user it has no permissions, thus causing the mentioned error.

This script is the only place where we use this active_profiles file, possible fixes include referring this to $PLAINBOX_SESSION_DATA (which I'd prefer to avoid) or setting it to a known location in a temporary directory (/tmp/ somewhere). I'm not yet clear if two different invocations of audio_settings will need access to this file; I think not, and that's what the --file parameter is for (persistent settings storage), but I'll read the code more closely to see if we need something persistent or whether maybe a temporary file (mktemp) would do.

Changed in cdts:
status: Confirmed → Triaged
information type: Proprietary → Public
Changed in checkbox-support:
importance: Undecided → High
status: New → Triaged
Chris Gregan (cgregan)
Changed in cdts:
milestone: none → version2.0
Chris Gregan (cgregan)
Changed in cdts:
milestone: version1.10 → none
Chris Gregan (cgregan)
Changed in cdts:
milestone: none → 1.12
Daniel Manrique (roadmr)
Changed in checkbox-support:
milestone: none → 0.8
Daniel Manrique (roadmr)
Changed in checkbox-support:
status: Triaged → Fix Committed
Changed in cdts:
status: Triaged → Fix Committed
Changed in checkbox-support:
assignee: nobody → Daniel Manrique (roadmr)
Daniel Manrique (roadmr)
Changed in checkbox-support:
status: Fix Committed → Fix Released
Chris Gregan (cgregan)
Changed in cdts:
status: Fix Committed → Fix Released
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.