1. 14 Jun, 2019 1 commit
  2. 11 May, 2019 1 commit
  3. 14 Mar, 2019 1 commit
  4. 13 Mar, 2019 2 commits
  5. 13 Feb, 2019 2 commits
  6. 16 Nov, 2018 1 commit
  7. 09 Nov, 2018 1 commit
  8. 30 Apr, 2018 2 commits
  9. 09 Mar, 2018 1 commit
    • Tyler Hicks's avatar
      tests: Allow shell helper test read the locale · 2bc64070
      Tyler Hicks authored
      The environ.sh test fails with the following fatal error:
      
        Fatal Error (environ): Unable to run test sub-executable
      
      The reason is due to the tests which use the env_check.sh helper see
      unexpected output in the helper's output:
      
        /bin/bash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
      
      I see a number of locale related denials:
      
      apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/usr/lib/locale/locale-archive" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
      apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/etc/locale.alias" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
      apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/usr/lib/locale/C.UTF-8/LC_IDENTIFICATION" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
      apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/usr/lib/locale/C.UTF-8/LC_CTYPE" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
      apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/usr/lib/locale/C.UTF-8/LC_COLLATE" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
      apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/usr/lib/locale/C.UTF-8/LC_MESSAGES/" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
      apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/usr/lib/locale/C.UTF-8/LC_NUMERIC" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
      apparmor="DENIED" operation="open" profile="/aa/tests/regression/apparmor/env_check.sh" name="/usr/lib/locale/C.UTF-8/LC_TIME" pid=738 comm="env_check.sh" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
      
      Allowing everything under /usr/lib/locale/ to be read by the helper
      results in the environ.sh test passing.
      Signed-off-by: Tyler Hicks's avatarTyler Hicks <tyhicks@canonical.com>
      2bc64070
  10. 20 Jan, 2018 1 commit
  11. 03 Nov, 2017 1 commit
  12. 01 Nov, 2017 1 commit
  13. 08 Sep, 2017 1 commit
  14. 07 Sep, 2017 4 commits
  15. 06 Apr, 2017 1 commit
  16. 04 Apr, 2017 1 commit
    • Colin King's avatar
      tests: where necessary use getdents64 to fix arm64 build failure · 929b1acf
      Colin King authored
      https://launchpad.net/bugs/1674245
        
      arm64 build of the tests breaks because getdents is not available.
      Where available, use gendents64 as the preferred choice.
        
      Fixes:
        
      cc -g -O0 -Wall -Wstrict-prototypes readdir.c -lapparmor -o readdir
      readdir.c: In function ‘main’:
      readdir.c:45:14: error: ‘SYS_getdents’ undeclared (first use in this function)
      if (syscall(SYS_getdents, fd, &dir, sizeof(struct dirent)) == -1){
                  ^~~~~~~~~~~~
      readdir.c:45:14: note: each undeclared identifier is reported only once for each function it appears in
      <builtin>: recipe for target 'readdir' failed
      make: *** [readdir] Error 1
      Signed-off-by: Tyler Hicks's avatarTyler Hicks <tyhicks@canonical.com>
      929b1acf
  17. 02 Feb, 2017 1 commit
  18. 05 Oct, 2016 1 commit
  19. 29 Sep, 2016 1 commit
  20. 03 Sep, 2016 1 commit
  21. 25 Jun, 2016 2 commits
    • Tyler Hicks's avatar
      tests: Fix onexec.sh races by using the transition test program · d0e49476
      Tyler Hicks authored
      The onexec.sh test has periodically exhibited unexplicable failures that
      are possibly due to race conditions when onexec.sh is verifying the
      /proc/PID/attr/{current,exec} values of the process under test. This
      patch attempts to solve the flaky test failures by removing the need for
      IPC to coordinate between the test script and the test program.
      
      The old onexec test program is removed and the transition test program
      is used instead. This allows for the test script to tell the transition
      test program what its current and exec procattr labels should be via
      command line options.
      
      Since IPC is no longer needed, the signal:ALL allow rule can be dropped
      from the test profile. A new allow rule is needed to grant reading of
      /proc/*/attr/{current,exec} since transition must verify the contents of
      these files.
      Signed-off-by: Tyler Hicks's avatarTyler Hicks <tyhicks@canonical.com>
      Acked-by: 's avatarSeth Arnold <seth.arnold@canonical.com>
      d0e49476
    • Tyler Hicks's avatar
      tests: Add transition test options to verify exec procattr · af1d141f
      Tyler Hicks authored
      Add optional command line parameters to the transition test program that
      can be used to verify a certain label and/or mode that should be found
      in /proc/self/attr/exec.
      Signed-off-by: Tyler Hicks's avatarTyler Hicks <tyhicks@canonical.com>
      Acked-by: 's avatarSeth Arnold <seth.arnold@canonical.com>
      af1d141f
  22. 31 May, 2016 2 commits
  23. 28 May, 2016 4 commits
  24. 11 May, 2016 1 commit
    • Seth Arnold's avatar
      syscall_sysctl test: correctly skip if CONFIG_SYSCTL_SYSCALL=n · 5781ad05
      Seth Arnold authored
      From: Simon McVittie <simon.mcvittie@collabora.co.uk>
      Date: Wed, 11 May 2016 13:52:56 +0100
      Subject: syscall_sysctl test: correctly skip if CONFIG_SYSCTL_SYSCALL=n
      
      This test attempts to auto-skip the sysctl() part if that syscall
      was not compiled into the current kernel, via
      CONFIG_SYSCTL_SYSCALL=n. Unfortunately, this didn't actually work,
      for two reasons:
      
      * Because "${test} ro" wasn't in "&&", "||", a pipeline or an "if",
        and it had nonzero exit status, the trap on ERR was triggered,
        causing execution of the error_handler() shell function, which
        aborts the test with a failed status. The rules for ERR are the
        same as for "set -e", so we can circumvent it in the same ways.
      * Because sysctl_syscall.c prints its diagnostic message to stderr,
        but the $() operator only captures stdout, it never matched
        in the string comparison. This is easily solved by redirecting
        its stderr to stdout.
      Signed-off-by: 's avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
      5781ad05
  25. 29 Mar, 2016 1 commit
  26. 24 Mar, 2016 1 commit
  27. 19 Mar, 2016 3 commits