Commit Graph

5 Commits

Author SHA1 Message Date
Christian Göttsche 8e3a532880 libsemanage/tests: use strict prototypes
utilities.c:39:22: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    int create_test_store() {
                         ^
                          void
    utilities.c:171:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    int destroy_test_store() {
                          ^
                           void

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
2023-08-16 13:33:12 -04:00
James Carter 031c033046 libsemanage/tests: Declare file local functions as static
This is needed to use "-Wmissing-prototypes".

Signed-off-by: James Carter <jwcart2@gmail.com>
2022-04-20 14:03:44 -04:00
Christian Göttsche fe01a91a79
libsemanage/tests: free memory
Free all memory in test cases, reported by LeakSanitizer.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2021-11-11 22:40:30 +01:00
Jan Zarsky 638e2f9df0 libsemanage: add helper functions to tests
- Add functions for creating and destroying test semanage store.
- Add functions for writing SELinux policy to the test store.
- Add functions for creating semanage handle, connecting to the store and for
  beginning a transaction.
- Update Makefile to compile test policies from CIL source.

Signed-off-by: Jan Zarsky <jzarsky@redhat.com>
2019-06-19 09:01:48 -07:00
Joshua Brindle 13cd4c8960 initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00