apparmor-bluez-avrcp-volume manual
medium
- Image Types:
- hmi-armhf / hmi-arm64 / hmi-amd64
- Image Deployment:
- APT, OSTree
- Type:
- functional
Description
Test AppArmor profile for Bluez AVRCP volume up and down commands.
Resources
- A Bluetooth adapter.
- An A2DP Source and AVRCP capable phone (https://www.apertis.org/reference_hardware/extras/)
Pre Conditions
- Clone the tests repository from another computer (Note that the branch being tested may change depending on the release, please make sure to clone the correct branch for the release in question):
- Copy the test directory to the target device:
- Log into the target device:
- After log into the DUT, enter the test directory, and run respective commands mentioned in the execution steps
- Please note that connman disables bluetooth by default on a fresh image. If it's already enabled, connmanctl will give an "In progress" error that may be ignored. To enable the device:
$ git clone --depth 1 --branch apertis/v2026dev1 https://gitlab.apertis.org/tests/apparmor-bluez-setup
$ git clone --depth 1 --branch apertis/v2026dev1 https://gitlab.apertis.org/tests/bluez-phone
$ DUT_IP=<device-ip>
$ scp -r apparmor-bluez-setup bluez-phone user@$DUT_IP:
$ ssh user@$DUT_IP
$ connmanctl enable bluetooth
Execution Steps
- First ensure that the bluez-avrcp-volume test case is passing before executing the apparmor-bluez-avrcp-volume test one (otherwise false-negative might occur):
- Ensure the audio manager is activated:
- Run btmon before any connection happens:
- Execute the test suite in another terminal:
- After verifying that the bluez-avrcp-volume test is passing, open a new terminal and run the following. Do not yet answer to the question.
- Now, run the bluez-avrcp-volume test case again in the previous terminal.
- After the bluez-avrcp-volume test ended, answer y to check for complaints.
$ pactl stat
$ sudo btmon | grep -A4 'AV/C: Control'
$ cd $HOME/bluez-phone ; ./bluez-avrcp-volume.sh
$ cd $HOME/apparmor-bluez-setup ; ./aa_get_complaints.sh
$ cd $HOME/bluez-phone ; ./bluez-avrcp-volume.sh
Expected
When the TC has been run, once the log collection script finishes check its output.
On Success, aa_get_complaints.sh will find no complaints:
[...snip useless output...]
>>> Checking for apparmor complaints ...
>>> No complaints found!
If something goes wrong, the output will be similar to:
[...snip useless output...]
>>> Complaints found, creating report ...
aa-dump_20180710-100931/
aa-dump_20180710-100931/complaint_tokens.log
aa-dump_20180710-100931/audit.log
aa-dump_20180710-100931/ps_aux.log
aa-dump_20180710-100931/uname.log
aa-dump_20180710-100931/journalctl.log
aa-dump_20180710-100931/image_version
aa-dump_20180710-100931/os-release
>>> Report created as /home/chaiwala/aa-dump_20180710-100931.tar.bz2
In this case file a bug report against AppArmor attaching the tar.bz2 file created.