Re: [PATCH linux-kselftest/test v1] apparmor: add AppArmor KUnit tests for policy unpack

2019-10-19 Thread Luis Chamberlain
On Sat, Oct 19, 2019 at 01:56:01PM +0100, Alan Maguire wrote: > On Fri, 18 Oct 2019, Luis Chamberlain wrote: > > > On Thu, Oct 17, 2019 at 05:18:16PM -0700, Brendan Higgins wrote: > > > From: Mike Salvatore > > > > > > In order to write the tests against the policy unpacking code, some > > > sta

Re: [PATCH linux-kselftest/test v1] apparmor: add AppArmor KUnit tests for policy unpack

2019-10-19 Thread Alan Maguire
On Fri, 18 Oct 2019, Luis Chamberlain wrote: > On Thu, Oct 17, 2019 at 05:18:16PM -0700, Brendan Higgins wrote: > > From: Mike Salvatore > > > > In order to write the tests against the policy unpacking code, some > > static functions needed to be exposed for testing purposes. One of the > > goal

Re: [PATCH linux-kselftest/test v1] apparmor: add AppArmor KUnit tests for policy unpack

2019-10-18 Thread Brendan Higgins
On Fri, Oct 18, 2019 at 9:25 AM Theodore Y. Ts'o wrote: > > On Thu, Oct 17, 2019 at 05:43:07PM -0700, Brendan Higgins wrote: > > > +config SECURITY_APPARMOR_TEST > > > + bool "Build KUnit tests for policy_unpack.c" > > > + default n > > > + depends on KUNIT && SECURITY_APPARMOR > > > > Ted,

Re: [PATCH linux-kselftest/test v1] apparmor: add AppArmor KUnit tests for policy unpack

2019-10-18 Thread Theodore Y. Ts'o
On Thu, Oct 17, 2019 at 05:43:07PM -0700, Brendan Higgins wrote: > > +config SECURITY_APPARMOR_TEST > > + bool "Build KUnit tests for policy_unpack.c" > > + default n > > + depends on KUNIT && SECURITY_APPARMOR > > Ted, here is an example where doing select on direct dependencies is > tricky

Re: [PATCH linux-kselftest/test v1] apparmor: add AppArmor KUnit tests for policy unpack

2019-10-18 Thread Luis Chamberlain
On Thu, Oct 17, 2019 at 05:18:16PM -0700, Brendan Higgins wrote: > From: Mike Salvatore > > In order to write the tests against the policy unpacking code, some > static functions needed to be exposed for testing purposes. One of the > goals of this patch is to establish a pattern for which testin

Re: [PATCH linux-kselftest/test v1] apparmor: add AppArmor KUnit tests for policy unpack

2019-10-17 Thread Brendan Higgins
On Thu, Oct 17, 2019 at 05:18:16PM -0700, Brendan Higgins wrote: > From: Mike Salvatore > > Add KUnit tests to test AppArmor unpacking of userspace policies. > AppArmor uses a serialized binary format for loading policies. To find > policy format documentation see > Documentation/admin-guide/LSM/

Re: [PATCH linux-kselftest/test v1] apparmor: add AppArmor KUnit tests for policy unpack

2019-10-17 Thread Iurii Zaikin
On Thu, Oct 17, 2019 at 5:19 PM Brendan Higgins wrote: > +config SECURITY_APPARMOR_TEST > + bool "Build KUnit tests for policy_unpack.c" > + default n > + depends on KUNIT && SECURITY_APPARMOR > + help > select SECURITY_APPARMOR ? > + KUNIT_EXPECT_EQ(test, size, TEST

[PATCH linux-kselftest/test v1] apparmor: add AppArmor KUnit tests for policy unpack

2019-10-17 Thread Brendan Higgins
From: Mike Salvatore Add KUnit tests to test AppArmor unpacking of userspace policies. AppArmor uses a serialized binary format for loading policies. To find policy format documentation see Documentation/admin-guide/LSM/apparmor.rst. In order to write the tests against the policy unpacking code,