source
code documentation
main.c File Reference
Detailed Description
Main file of structural tests.
- Author:
- Niklaus Schild <n.schild@gmx.ch>
Christian Scheurer <http://www.christianscheurer.ch>
OUTLINE:
This module contains the main function where the structural test is executed. It basically loops over the test routines which are provided by the tested modules. Each module which needs to be tested must provide a function with the following interface: void (*function)(test_result *). Before a test for an appropriate module is performed, the function needs to be registred in the test_function_set array.
IMPLEMENTATION:
The implementation uses an array of function pointers. The programmer needs to register the new test function statically in the main file of this module. During execution of the test, all functions registered in the test_function_set are executed.
NOTES:
to add a test to this testing procedure you have to perform the following steps:
- declare the new test function as extern
- add the test function and its name to the test_function_set
- recompile and be assure that the tests return 'successful' or with 'not implemented'
This document is part of embedded IPsec
Copyright (c) 2003 Niklaus Schild and Christian Scheurer, HTI Biel/Bienne
All rights reserved.
Definition in file main.c.
#include "testing/structural/structural_test.h"
#include "ipsec/debug.h"
#include "ipsec/util.h"
Go to the source code of this file.
Define Documentation
|
defines the number of test functions
Definition at line 95 of file main.c. |
Typedef Documentation
Function Documentation
|
Main test function for the AH tests. It does nothing but calling the subtests one after the other.
Definition at line 181 of file ah_test.c. |
|
Main test function for the DES/3DES CBC tests. It does nothing but calling the subtests one after the other.
Definition at line 219 of file des_test.c. |
|
Main test function for the ESP tests. It does nothing but calling the subtests one after the other.
Definition at line 355 of file esp_test.c. |
|
Executes the structural testing framework.
- Returns:
- void
Definition at line 103 of file main.c. |
|
Main testfunction for the MD5 tests. It does nothing but calling the subtests one after the other.
Definition at line 218 of file md5_test.c. |
|
Main test function for the SA tests. It does nothing but calling the subtests one after the other.
Definition at line 887 of file sa_test.c. |
|
Main test function for the SHA1 tests. It does nothing but calling the subtests one after the other.
Definition at line 268 of file sha1_test.c. |
|
Test function for all the log functions (Note: some of these tests are commented out by default to make the log output more uniform)
Definition at line 117 of file util_test.c. |
Variable Documentation
|
Initial value:
{
{ util_debug_test, "util_debug_test" },
{ des_test, "des_test" },
{ md5_test, "md5_test" },
{ sha1_test, "sha1_test" },
{ sa_test, "sa_test" },
{ ah_test, "ah_test" },
{ esp_test, "esp_test" }
}
Definition at line 84 of file main.c. |
|