diff options
author | Ashlee Young <ashlee@wildernessvoice.com> | 2016-01-20 01:10:01 +0000 |
---|---|---|
committer | Ashlee Young <ashlee@wildernessvoice.com> | 2016-01-20 01:10:11 +0000 |
commit | 19d701ddf07d855128ded0cf2b573ce468e3bdd6 (patch) | |
tree | 0edcd3461ca903c76e431bb7c6348c42a0f12488 /framework/src/audit/src/test/ilist_test.c | |
parent | fac6fbefbfad1cf837ddd88bc0d330559c8eb6f9 (diff) |
Removing Suricata and Audit from source repo, and updated build.sh to avoid building suricata. Will re-address this in C release via tar balls.
Change-Id: I3710076f8b7f3313cb3cb5260c4eb0a6834d4f6e
Signed-off-by: Ashlee Young <ashlee@wildernessvoice.com>
Diffstat (limited to 'framework/src/audit/src/test/ilist_test.c')
-rw-r--r-- | framework/src/audit/src/test/ilist_test.c | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/framework/src/audit/src/test/ilist_test.c b/framework/src/audit/src/test/ilist_test.c deleted file mode 100644 index 85787126..00000000 --- a/framework/src/audit/src/test/ilist_test.c +++ /dev/null @@ -1,69 +0,0 @@ -#include <stdio.h> -#include "ausearch-int.h" - -int main(void) -{ - int i = 0; - ilist e; - int_node *node; - - ilist_create(&e); - - // This first test checks to see if list is - // created in a numeric order - ilist_add_if_uniq(&e, 6, 0); - ilist_add_if_uniq(&e, 5, 0); - ilist_add_if_uniq(&e, 7, 0); - ilist_add_if_uniq(&e, 1, 0); - ilist_add_if_uniq(&e, 8, 0); - ilist_add_if_uniq(&e, 2, 0); - ilist_add_if_uniq(&e, 9, 0); - ilist_add_if_uniq(&e, 0, 0); - ilist_add_if_uniq(&e, 4, 0); - ilist_add_if_uniq(&e, 3, 0); - - ilist_first(&e); - do { - node = ilist_get_cur(&e); - if (i != node->num) { - printf("Test failed - i:%d != num:%d\n", i, node->num); - return 1; - } - i++; - } while ((node = ilist_next(&e))); - - ilist_clear(&e); - puts("starting sort test"); - - // Now test to see if the sort function works - // Fill the list exactly backwards - ilist_add_if_uniq(&e, 3, 0); - ilist_add_if_uniq(&e, 3, 0); - ilist_add_if_uniq(&e, 4, 0); - ilist_add_if_uniq(&e, 3, 0); - ilist_add_if_uniq(&e, 4, 0); - ilist_add_if_uniq(&e, 2, 0); - ilist_add_if_uniq(&e, 4, 0); - ilist_add_if_uniq(&e, 2, 0); - ilist_add_if_uniq(&e, 4, 0); - ilist_add_if_uniq(&e, 1, 0); - - ilist_sort_by_hits(&e); - - i = 0; - ilist_first(&e); - do { - node = ilist_get_cur(&e); - if (node->hits != (4-i)) { - printf("Sort test failed - i:%d != ihits:%d\n", i, node->hits); - return 1; - } - i++; - } while ((node = ilist_next(&e))); - - ilist_clear(&e); - - printf("ilist tests passed\n"); - return 0; -} - |