GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > MON / V0-2-0

Constituent: mon_unit_test     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

mon_unit_test.h File Reference

Interface to the test utility functions found in mon_unit_test.c. More...

#include "MON/MON_pubdefs.h"

Include dependency graph for mon_unit_test.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Data Structures

struct  _test_Test_Descriptor
 Description of a test state. More...


Defines

#define DIM(a)   (sizeof (a) / sizeof ((a)[0]))
 Dimension of an array.


Typedefs

typedef _test_Test_Descriptor test_Test_Descriptor
 Typedef for _test_Test_Descriptor.


Functions

void test_Push_State (test_Test_Descriptor *td_p, const char *desc, const int index)
 Enter a new test state.

void test_Pop_State (test_Test_Descriptor *td_p)
 Return for a test state.

void test_Show (const test_Test_Descriptor *td_p, const int level, const char *item_1, const char *item_2)
 Display text with indentation.

void test_Show_Msg_OK (const test_Test_Descriptor *td_p)
 Indicate that the next error message is expected.

void test_Sleep_Sec (const test_Test_Descriptor *td_p, const int num_secs)
 Sleep for the specified number of seconds.

int test_Generic_Error (const test_Test_Descriptor *td_p, const char *fmt, const char *str_param, const unsigned int int_param)
 Display a generic error message.

int test_Status_Compare (const test_Test_Descriptor *td_p, const unsigned int expect, const unsigned int actual, const char *func)
 Check a MSG status code value.

int test_Value32_Compare (const test_Test_Descriptor *td_p, const unsigned int expect, const unsigned int actual, const char *desc)
 Check a 32-bit value.

int test_NULL_Compare (const test_Test_Descriptor *td_p, const unsigned int actual, const char *desc)
 Check a 32-bit value to make sure it is not NULL.

int test_Memory_Compare (const test_Test_Descriptor *td_p, const void *expect_p, const void *actual_p, const void *mask_p, const size_t num_bytes)
 Verify the contents of a buffer in memory.

int test_Loading_Compare (const test_Test_Descriptor *td_p, const MON_Load_Stats *min_p, const MON_Load_Stats *max_p, const MON_Load_Stats *actual_p)
 Verify CPU loading statistics.

int test_Perf_Compare (const test_Test_Descriptor *td_p, const MON_Perf_Stats *min_p, const MON_Perf_Stats *max_p, const MON_Perf_Stats *actual_p, const MON_Perf_Config *cfg_p)
 Verify performance monitor statistics.

void test_Show_Item (const test_Test_Descriptor *td_p, const char *name, const char *fmt, const char *str_param, const unsigned int int_param)
 Display an item of data.


Detailed Description

Interface to the test utility functions found in mon_unit_test.c.

**  CVS $Id: mon_unit_test.h,v 1.2 2005/03/30 17:01:15 dmay Exp $
**  

Function Documentation

int test_Generic_Error const test_Test_Descriptor td_p,
const char *  fmt,
const char *  str_param,
const unsigned int  int_param
 

Display a generic error message.

Parameters:
td_p Pointer to test descriptor.
fmt Format string to display.
str_param First parameter (string) for fmt string.
int_param Second parameter (uint) for fmt string.
Returns:
-1.

Here is the call graph for this function:

int test_Loading_Compare const test_Test_Descriptor td_p,
const MON_Load_Stats min_p,
const MON_Load_Stats max_p,
const MON_Load_Stats actual_p
 

Verify CPU loading statistics.

Parameters:
td_p Pointer to test descriptor.
min_p Pointer to minimum loading values.
max_p Pointer to maximum loading values.
actual_p Pointer to actual loading values.
Return values:
0 Loading statistics are between min and max values.
-1 One or more loading statistics values is incorrect.

Here is the call graph for this function:

int test_Memory_Compare const test_Test_Descriptor td_p,
const void *  expect_p,
const void *  actual_p,
const void *  mask_p,
const size_t  num_bytes
 

Verify the contents of a buffer in memory.

This function verifies the contents of a memory buffer and reports an error if the values are not as expected. An optional mask can be used to indicate which bits should be verified.

Parameters:
td_p Pointer to test descriptor.
expect_p Pointer to a memory buffer with the expected values.
actual_p Pointer to the memory buffer to verify.
mask_p Pointer to a memory buffer of mask values.
num_bytes Number of bytes to verify within the buffer.
Return values:
0 Buffer values are correct.
-1 One or more values within the buffer are incorrect.

Here is the call graph for this function:

int test_NULL_Compare const test_Test_Descriptor td_p,
const unsigned int  actual,
const char *  desc
 

Check a 32-bit value to make sure it is not NULL.

Parameters:
td_p Pointer to test descriptor.
actual Actual value.
desc Description of the value.
Return values:
0 Actual value != NULL.
-1 Actual value == NULL.

Here is the call graph for this function:

int test_Perf_Compare const test_Test_Descriptor td_p,
const MON_Perf_Stats min_p,
const MON_Perf_Stats max_p,
const MON_Perf_Stats actual_p,
const MON_Perf_Config cfg_p
 

Verify performance monitor statistics.

Parameters:
td_p Pointer to test descriptor.
min_p Pointer to minimum statistics values.
max_p Pointer to maximum statistics values.
actual_p Pointer to actual statistics values.
cfg_p Pointer to performance monitor configuration.
Return values:
0 Performance statistics are between min and max values.
-1 One or more performance statistics values is incorrect.

Here is the call graph for this function:

void test_Pop_State test_Test_Descriptor td_p  ) 
 

Return for a test state.

Pop a test state description from a test's state stack.

Parameters:
td_p Pointer to test descriptor.
Returns:
Nothing.

Here is the call graph for this function:

void test_Push_State test_Test_Descriptor td_p,
const char *  desc,
const int  index
 

Enter a new test state.

Push a new test state description onto a test's state stack. This state stack provides a trace of the execution of the test.

Parameters:
td_p Pointer to test descriptor.
desc Description of the new state.
index Generic index value.
Returns:
Nothing.

Here is the call graph for this function:

void test_Show const test_Test_Descriptor td_p,
const int  level,
const char *  item_1,
const char *  item_2
 

Display text with indentation.

Display text with indentation appropriate for the specified level.

Parameters:
td_p Pointer to test descriptor.
level Indentation level.
item_1 First text string to display.
item_2 Second text string to display.
Returns:
Nothing.

Here is the call graph for this function:

void test_Show_Item const test_Test_Descriptor td_p,
const char *  name,
const char *  fmt,
const char *  str_param,
const unsigned int  int_param
 

Display an item of data.

This function displays an item of data in a predefined format.

Parameters:
td_p Pointer to test descriptor.
name Name of the item.
fmt Format string to display the item's value.
str_param First parameter (string) for fmt string.
int_param Second parameter (uint) for fmt string.
Returns:
Nothing.

Here is the call graph for this function:

void test_Show_Msg_OK const test_Test_Descriptor td_p  ) 
 

Indicate that the next error message is expected.

Display text that indicates that the next error message is expected.

Parameters:
td_p Pointer to test descriptor.
Returns:
Nothing.

Here is the call graph for this function:

void test_Sleep_Sec const test_Test_Descriptor td_p,
const int  num_secs
 

Sleep for the specified number of seconds.

Parameters:
td_p Pointer to test descriptor.
num_secs Number of seconds to sleep.
Returns:
Nothing.

Here is the call graph for this function:

int test_Status_Compare const test_Test_Descriptor td_p,
const unsigned int  expect,
const unsigned int  actual,
const char *  func
 

Check a MSG status code value.

Compare actual and expected status code values and display a message if they differ.

Parameters:
td_p Pointer to test descriptor.
expect Expected value.
actual Actual value.
func Name of the function that returned the status.
Return values:
0 Actual value == Expected value
-1 Actual value != Expected value.

Here is the call graph for this function:

int test_Value32_Compare const test_Test_Descriptor td_p,
const unsigned int  expect,
const unsigned int  actual,
const char *  desc
 

Check a 32-bit value.

Compare actual and expected 32-bit values and display a message if they differ.

Parameters:
td_p Pointer to test descriptor.
expect Expected value.
actual Actual value.
desc Description of the value.
Return values:
0 Actual value == Expected value
-1 Actual value != Expected value.

Here is the call graph for this function:


Generated on Sun Jul 17 09:45:42 2005 by doxygen 1.3.3