Skip to contentSkip to conversation

libsepol unit tests

PATCH In review Joshua Brindle 2 participants 2 messages Aug 3, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

cover libsepol unit tests

This patchset adds unit tests to libsepol for the linker, the expander and the dependency algorithm as well as more infrastructure to make adding tests much easier. The linker and dep tests are fairly exhaustive but the expander ones will need to be added to over time. I lindented the patches but removed the line length limit, since almost all the calls were over 80 columns the link limit mutilated the tests and made them very difficult to read.

It runs all tests once with mls on and again with it off so you'll get 2 sets of results:

./libsepol-tests

CUnit - A Unit testing framework for C - Version 2.1-0
http://cunit.sourceforge.net/

Suite: cond
Test: cond_expr_equal ... passed
Suite: linker
Test: linker_indexes ... passed
Test: linker_types ... passed
Test: linker_roles ... passed
Test: linker_cond ... passed
Suite: expander
Test: expander_indexes ... passed
Test: expander_role_mapping ... passed
Test: expander_user_mapping ... passed
Test: expander_alias ... passed
Suite: deps
Test: deps_modreq_global ... passed
Test: deps_modreq_opt ... passed

--Run Summary: Type Total Ran Passed Failed

               suites        4       4     n/a       0
               tests        11      11      11       0
               asserts    1088    1088    1088       0

CUnit - A Unit testing framework for C - Version 2.1-0
http://cunit.sourceforge.net/

Suite: cond
Test: cond_expr_equal ... passed
Suite: linker
Test: linker_indexes ... passed
Test: linker_types ... passed
Test: linker_roles ... passed
Test: linker_cond ... passed
Suite: expander
Test: expander_indexes ... passed
Test: expander_role_mapping ... passed
Test: expander_user_mapping ... passed
Test: expander_alias ... passed
Suite: deps
Test: deps_modreq_global ... passed
Test: deps_modreq_opt ... passed

--Run Summary: Type Total Ran Passed Failed

               suites        4       4     n/a       0
               tests        11      11      11       0
               asserts    1138    1138    1138       0

The policies are quite large (452k) so I've included a bzip of them in this email. Please delete the old contents of libsepol/tests/policies and untar this from the top of the repository.

#1 lore raw
Quoted 7 lines · Joshua Brindle

This patchset adds unit tests to libsepol for the linker, the expander and the dependency algorithm as well as more infrastructure to make adding tests much easier. The linker and dep tests are fairly exhaustive but the expander ones will need to be added to over time. I lindented the patches but removed the line length limit, since almost all the calls were over 80 columns the link limit mutilated the tests and made them very difficult to read.

Needs to be updated for the symtab_datum_t change.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.