ClickAppArmor

Differences between revisions 1 and 24 (spanning 23 versions)
Revision 1 as of 2014-03-11 18:52:29
Size: 929
Editor: jdstrand
Comment:
Revision 24 as of 2016-08-26 16:39:43
Size: 3218
Editor: jdstrand
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
 * '''Test plan for component''': <COMMON> (Replace this with your own compnent)
 * '''Component Checklist''': <backlink to your component checklist>
 * '''Trunk URL''': lp:trunkbranch
 * '''Ubuntu Package URL (LP)''': http://launchpad.net/ubuntu/+source/PACKAGENAME
 * '''Test plan for component''': !ClickAppArmor
 * '''Component Checklist''': https://wiki.ubuntu.com/Process/Merges/Checklists/ClickAppArmor
 * '''Trunk URL''': lp:click-apparmor
 * '''Ubuntu Package URL (LP)''': http://launchpad.net/ubuntu/+source/click-apparmor
Line 9: Line 8:
<list the hot clients of this component and that are likely to see side-effect regressions from MP landings>  * upstart-app-launch (uses apparmor kernel interface via upstart to load the AppArmor profile generated by click-apparmor)
 * ubuntu-sdk (eventually, once it uses the new aa-clickquery command)
Line 12: Line 12:
 * Install image on phone
 * Reboot before installing the new MPs
 * Install freshly build MPs that are needed for landing
 * Examine `sudo aa-status` and verify it looks ok. It should report many profiles are loaded for click packages. Perform `sudo aa-status|wc -l`. You might want to save the output of `sudo aa-status` in $HOME for comparison later.
 * Reboot
 * Verify that `sudo aa-status|wc -l` has the same output after the reboot with the new packages as before the reboot with the old packages
 * Verify apps launch
  * Launch an app (eg, start the weather app). Does it start?
  * Run `sudo aa-status`, is the process for the app running under confinement (in enforce mode)?
 * Ensure that webapps launch
  * launch a webapp (eg, start the facebook webapp). Does it start?
  * Run `sudo aa-status`, is the process for the webapp running under confinement (in enforce mode)?
 * Run image tests on Ubuntu Touch (emulator or touch image):{{{
$ git clone https://git.launchpad.net/qa-regression-testing
$ cd qa-regression-testing
$ adb push ./tests /tmp/tests
$ adb shell /tmp/tests/image/unprivileged/click-apparmor 2>&1 | tee /tmp/ca.out
$ adb shell /tmp/tests/image/unprivileged/apparmor-easyprof-ubuntu 2>&1 | tee /tmp/aeu.out
}}}
  * '''Note:''' if testing a new framework, be sure to declare the new framework in /usr/share/click/frameworks/<framework>.framework before running the above image tests
  * '''Note 2:''' if testing on a device with a poor USB connection, install 'screen' (either pull the binary from a deb and run it or `mount -o remount,rw / && dpkg -i /path/to/screen...deb && sudo mount -o remount,ro /`
 * Run autopkgtests
  0. make sure the schroot is up to date (eg, `autopkgtest-trusty-amd64`)
  0. download the new !AppArmor binaries to ../binary
  0. run the tests:
   * 14.04: {{{
$ adt-run -B ../binary/*.deb --source ../source/*.dsc --log-file /tmp/adt.out --- adt-virt-schroot autopkgtest-trusty-amd64 || echo "** AUTOPKGTESTS FAILED"
}}}
   * 14.10 and higher: {{{
$ export REL=vivid
$ adt-run `for i in ../binary/*.deb ; do echo -n "-B $i " ; done` --source ../source/*.dsc --log-file /tmp/adt.out --- adt-virt-schroot autopkgtest-$REL-amd64 || echo "** AUTOPKGTESTS FAILED"
}}}
   * 16.04 (likely applies to vivid, but leaving that for posterity): {{{
$ export REL=xenial
$ adt-run ../binary/*.deb -B --source ../source/*.dsc --log-file /tmp/adt.out --- adt-virt-schroot autopkgtest-$REL-amd64 || echo "** AUTOPKGTESTS FAILED"
}}}
Line 13: Line 49:
'''This test plan is not supposed to be complete; use it to guide your manual testing so they dont miss big functional areas that are part in the component; also this should be used as guideline to inspire the exploratory testing which should be adapted smartly based on the real content of a MP'''

 * Install image on phone
 * install freshly build MPs that are needed for landing
 * Test that X works
 * Test that Y works
 * Ensure that all AP tests running <… command> are passing.
 Note, as of 2016/08/26 yakkety's autopkgtest 'test_aa-clickhook' fails due to a problem with 'click install' [[https://bugs.launchpad.net/ubuntu/+source/click/+bug/1615757|bug #1615757]]

Dependents/Clients

  • upstart-app-launch (uses apparmor kernel interface via upstart to load the AppArmor profile generated by click-apparmor)

  • ubuntu-sdk (eventually, once it uses the new aa-clickquery command)

Test Plan

  • Install image on phone
  • Reboot before installing the new MPs
  • Install freshly build MPs that are needed for landing
  • Examine sudo aa-status and verify it looks ok. It should report many profiles are loaded for click packages. Perform sudo aa-status|wc -l. You might want to save the output of sudo aa-status in $HOME for comparison later.

  • Reboot
  • Verify that sudo aa-status|wc -l has the same output after the reboot with the new packages as before the reboot with the old packages

  • Verify apps launch
    • Launch an app (eg, start the weather app). Does it start?
    • Run sudo aa-status, is the process for the app running under confinement (in enforce mode)?

  • Ensure that webapps launch
    • launch a webapp (eg, start the facebook webapp). Does it start?
    • Run sudo aa-status, is the process for the webapp running under confinement (in enforce mode)?

  • Run image tests on Ubuntu Touch (emulator or touch image):

    $ git clone https://git.launchpad.net/qa-regression-testing
    $ cd qa-regression-testing
    $ adb push ./tests /tmp/tests
    $ adb shell /tmp/tests/image/unprivileged/click-apparmor 2>&1 | tee /tmp/ca.out
    $ adb shell /tmp/tests/image/unprivileged/apparmor-easyprof-ubuntu 2>&1 | tee /tmp/aeu.out
    • Note: if testing a new framework, be sure to declare the new framework in /usr/share/click/frameworks/<framework>.framework before running the above image tests

    • Note 2: if testing on a device with a poor USB connection, install 'screen' (either pull the binary from a deb and run it or mount -o remount,rw / && dpkg -i /path/to/screen...deb && sudo mount -o remount,ro /

  • Run autopkgtests
    1. make sure the schroot is up to date (eg, autopkgtest-trusty-amd64)

    2. download the new AppArmor binaries to ../binary

    3. run the tests:
      • 14.04:

        $ adt-run -B ../binary/*.deb --source ../source/*.dsc --log-file /tmp/adt.out --- adt-virt-schroot autopkgtest-trusty-amd64 || echo "** AUTOPKGTESTS FAILED"
      • 14.10 and higher:

        $ export REL=vivid
        $ adt-run `for i in ../binary/*.deb ; do echo -n "-B $i " ; done` --source ../source/*.dsc --log-file /tmp/adt.out --- adt-virt-schroot autopkgtest-$REL-amd64 || echo "** AUTOPKGTESTS FAILED"
      • 16.04 (likely applies to vivid, but leaving that for posterity):

        $ export REL=xenial
        $ adt-run ../binary/*.deb -B --source ../source/*.dsc --log-file /tmp/adt.out --- adt-virt-schroot autopkgtest-$REL-amd64 || echo "** AUTOPKGTESTS FAILED"

    Note, as of 2016/08/26 yakkety's autopkgtest 'test_aa-clickhook' fails due to a problem with 'click install' bug #1615757

Process/Merges/TestPlans/ClickAppArmor (last edited 2016-08-26 16:39:43 by jdstrand)