apparmor automated

critical

Image Type:
target
Image Architecture:
any
Type:
functional

Description

Security infrastructure: checking that AppArmor is available in the kernel and active is part of strategic application and services confinement.


Pre Conditions

  1. From a PC, download and unpack the test data tarball from the gitlab test repository:
  2. $ wget https://gitlab.apertis.org/tests/apparmor/-/archive/master/apparmor.tar.gz

    $ tar -xvf apparmor.tar.gz

  3. Copy the apparmor-master-* to the target device:
  4. $ DUT_IP=<device-ip>

    $ scp -r apparmor-master-* user@$DUT_IP:

  5. Log into the target device:
  6. $ ssh user@$DUT_IP

  7. After log into the DUT, enter the test directory
  8. $ cd apparmor-master-*

  9. Note that the tarball may change depending on the release/branch being tested, please make sure to download the correct tarball for the release in question.

Execution Steps

  1. Execute the following command:
  2. $ $ common/run-test-in-systemd --basename --timeout 3000 ./apparmor.sh


Expected

The apparmor.sh script should return 0. The return value indicates the number of tests which failed. The ouput should be similar to the following example:

access.sh: PASSED - /tmp/sdtest.4283-31579-rMuWBs

capabilities.sh: FAILED - /tmp/sdtest.4548-350-UPHWk3

Although extraneous lines might been shown in case of error or for debug. Those won't interfere with the test parser.

Notes

  • Make sure that you have disconnect the ethernet connection to the target before you start the tethering process.
  • This testcase groups upstream developed tests mostly and therefore it's not runnning any Apertis specific test.