linux 4.13.0-13.14 ADT test failure with linux 4.13.0-13.14

Bug #1720660 reported by Seth Forshee
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Revision history for this message
Seth Forshee (sforshee) wrote :

Appears that kernel security tests need fixing after merging LSM stacking patches as config options have changed.

  ======================================================================
  FAIL: test_072_config_security_apparmor (__main__.KernelSecurityTest)
  CONFIG_SECURITY_APPARMOR enabled
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "./test-kernel-security.py", line 671, in test_072_config_security_apparmor
      self.assertEqual(self._get_config('DEFAULT_SECURITY_APPARMOR'), 'y')
  AssertionError: None != 'y'

  ----------------------------------------------------------------------

tags: added: kernel-adt-failure
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1720660

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
John Johansen (jjohansen) wrote :

Fixed in

commit 393d5cca6af1070709f2baaf291d16e27fbea366
Author: John Johansen <email address hidden>
Date: Thu Oct 5 13:50:51 2017 -0700

    Fix test-kernel-security.py when LSM stacking based kernel is used.

    In the LSM stacking kernel DEFAULT_SECURITY_APPARMOR is not set instead
    SECURITY_APPARMOR_STACKED is used to indicate it is part of the default
    stack.

    BugLink: http://bugs.launchpad.net/bugs/1720660
    Signed-off-by: John Johansen <email address hidden>

diff --git a/scripts/test-kernel-security.py b/scripts/test-kernel-security.py
index 2625f9aa..9eecdca5 100755
--- a/scripts/test-kernel-security.py
+++ b/scripts/test-kernel-security.py
@@ -668,7 +668,7 @@ class KernelSecurityTest(testlib.TestlibCase):
         '''CONFIG_SECURITY_APPARMOR enabled'''

         self.assertEqual(self._get_config('SECURITY_APPARMOR'), 'y')
- self.assertEqual(self._get_config('DEFAULT_SECURITY_APPARMOR'), 'y')
+ self.assertTrue(self._get_config('DEFAULT_SECURITY_APPARMOR') == 'y' or self._get_config('CONFIG_SECURITY_APPARMOR_STACKED') == 'y')
         self.assertEqual(self._get_config('SECURITY_APPARMOR_BOOTPARAM_VALUE'), '1')

     # Hardy and newer

Changed in linux (Ubuntu):
status: Incomplete → Fix Committed
Revision history for this message
John Johansen (jjohansen) wrote :

Marking it Fix Released. Please re-open if you find you still have issues.

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Seth Forshee (sforshee) wrote :

Looks like there's a typo, s/assertEqaul/assertEqual/.

Traceback (most recent call last):
    File "./test-kernel-security.py", line 675, in test_072_config_security_apparmor
      self.assertEqaul(self._get_config(default_apparmor_option), 'y')
  AttributeError: 'KernelSecurityTest' object has no attribute 'assertEqaul'

Changed in linux (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
John Johansen (jjohansen) wrote :

yep thanks, fixed and pushed

Changed in linux (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.