- Image Types:
- target-armhf-internal / target-amd64
- Image Deployment:
Test AppArmor profile for Bluez AVRCP volume up and down commands.
- A Bluetooth adapter.
- An A2DP Source and AVRCP capable phone (Galaxy Nexus)
- Ensure Rootfs is remounted as read/write.
- Install dependencies
- Restart the system to restore the filesystem state to read-only before running the test.
- 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:
- Start simple agent:
- Pair both devices initiating from the phone side
- Pay attention to the simple-agent window as it requires input during the pairing process.
$ sudo mount -o remount,rw /
$ sudo apt install chaiwala-tests apertis-tests-apparmor-report python3-dbus python3-gi
$ sudo reboot
$ connmanctl enable bluetooth
$ /usr/lib/chaiwala-tests/bluez/simple-agent -y
- Be sure that the bluez-avrcp-volume TC passes before executing this one, otherwise false-negative might occur.
- Ensure Pulse Audio is activated:
- Get the bluetooth device address by running hcitool scan and in another terminal, execute:
- Collect AppArmor auditd logs, by running:
- And press 'y' when asked, so the script can proceed.
$ pactl stat
$ /usr/lib/chaiwala-tests/bluez/test-avrcp.py -i hci0 <device_address>
$ aa_get_complaints.sh "barkway\|shapwick\|tinwell\|mildenhall"
On Success the script will find no complaints:
[...snip uselss output...]
>>> No complaints found!
While if something goes wrong, the output will be similar to:
[...snip useless output...]
>>> Complaints found, creating report ...
>>> Report created as /home/chaiwala/aa-dump_20130222-100931.tar.bz2
In this case file a bug report against development/apparmor attaching the tar.bz2 file created.