summaryrefslogtreecommitdiff
path: root/ubuntu/audit-test.yaml
blob: d980fef450552db706abbe27bdec45820a860244 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
metadata:
    name: audit
    format: "Lava-Test-Shell Test Definition 1.0"
    description: "The Linux audit framework provides a CAPP-compliant
      (Controlled Access Protection Profiles) auditing system that reliably
      collects information about any security-relevant(or non-security-relevant)
      event on a system. It can help you track actions performed on a system.
      Required kernel configs
      CONFIG_AUDIT=y
      CONFIG_HAVE_ARCH_AUDITSYSCALL=y
      CONFIG_AUDITSYSCALL=y
      CONFIG_AUDIT_WATCH=y
      CONFIG_AUDIT_TREE=y
      CONFIG_INTEGRITY_AUDIT=y
      CONFIG_AUDIT_GENERIC=y
      CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
      CONFIG_AUDIT_COMPAT_GENERIC=y"
    maintainer:
        - naresh.kamboju@linaro.org
    os:
        - ubuntu
    scope:
        - functional
    devices:
        - beaglebone-black
        - juno
        - kvm
        - vexpress-tc2

install:
    steps:
        - 'VERSION=2.4.1'
        - 'wget http://testdata.validation.linaro.org/tests/audit-$VERSION.tar.gz'
        - 'tar -xf audit-$VERSION.tar.gz'
        - 'cd audit-$VERSION'
        - './configure'
        - 'make all'
        - 'make install'
        - 'cd -'
    deps:
        - wget
        - make
        - automake
        - aptitude
        - expect
        - cpp
        - gcc
        - binutils
        - virt-what
        - libpod-latex-perl
        - libcap-dev
        - selinux-policy-default
        - selinux-policy-dev
        - libselinux1-dev
        - libselinux1
        - libaudit-dev
        - python-dev
        - libldap2-dev
        - libsasl2-dev
        - libssl-dev
        - swig
        - auditd

params:
    VERSION: '2.4.1'

run:
    steps:
        - 'HOME_PWD=`pwd`'
        - 'mkdir /usr/local/eal4_testing'
        - 'chmod 755 /usr/local/eal4_testing'
        - 'cd /usr/local/eal4_testing'
        - 'wget http://testdata.validation.linaro.org/tests/audit-test-code.tar.gz'
        - 'tar -xf audit-test-code.tar.gz'
        - 'chown -R root:root /usr/local/eal4_testing'
        - 'chmod a+rX /usr/local/eal4_testing'
        - 'cd audit-test-code/audit-test/'
        - 'make'
        - 'groupadd wheel'
        - 'useradd -c "EAL Test User" -g wheel eal'
        - '/usr/bin/expect $HOME_PWD/ubuntu/scripts/audit-make-run.exp'
        - 'pkill -9 auditd'
        - 'cat audit.rollup.log'
        - 'lava-test-case audit-test --result pass'
        - 'lava-test-case-attach audit-test audit.rollup.log text/plan'

parse:
    pattern: "^\\[\\d*\\]\\s+(?P<test_case_id>[. a-zA-Z0-9_-]+)\\s+(?P<result>ERROR|FAIL|PASS)"
    fixupdict:
        ERROR: skip
        FAIL: fail
        PASS: pass