GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MON / V0-3-1 > mon_unit_test / rhel4-32


Interface   Data Structures   File List   Data Fields   Globals  

mon_test_watchdog.c File Reference

Test the MON package watchdog functionality. More...

#include <MON/MON_msgs.h>
#include <MON/MON_pubdefs.h>
#include <mon_test_watchdog.h>
#include <mon_unit_test.h>
#include <MSG/MSG_pubdefs.h>
#include <PBS/MBA.h>
#include <PBS/TASK.h>
#include <string.h>

Classes

struct  _mon_Watchdog_Info
 MON watchdog test state. More...

Typedefs

typedef struct _mon_Watchdog_Info mon_Watchdog_Info
 Typedef for _mon_Watchdog_Info.

Functions

static int mon_initialize_wrap (test_Test_Descriptor *td_p, int id, mon_Watchdog_Info *info_p)
 Call MON_initialize() and validate the results.
static int mon_shutdown_wrap (test_Test_Descriptor *td_p, int id, mon_Watchdog_Info *info_p)
 Call MON_shutdown() and validate the results.
static int mon_start_db_wrap (test_Test_Descriptor *td_p, int id, mon_Watchdog_Info *info_p)
 Call MON_start_with_db() and validate the results.
static int mon_stop_wrap (test_Test_Descriptor *td_p, int id, mon_Watchdog_Info *info_p)
 Call MON_stop() and validate the results.
static int mon_set_watchdog_wrap (test_Test_Descriptor *td_p, int id, mon_Watchdog_Info *info_p)
 Call MON_set_watchdog() and validate the results.
static void * mon_load_task (TASK_parameter parm)
 Consume all CPU cycles.
static int mon_start_load_task (test_Test_Descriptor *td_p, int id, mon_Watchdog_Info *info_p)
 Start a task that consumes all CPU cycles.
static int mon_stop_load_task (test_Test_Descriptor *td_p, mon_Watchdog_Info *info_p)
 Stop a task that is consuming all CPU cycles.
static int mon_allocate (test_Test_Descriptor *td_p, mon_Watchdog_Info *info_p)
 Allocate memory for the CPU watchdog tests.
static int mon_free (test_Test_Descriptor *td_p, mon_Watchdog_Info *info_p)
 Free memory from the CPU watchdog tests.
void mon_test_watchdog (test_Test_Descriptor *td_p, const unsigned int bit_mask)
 Unit test for MON watchdog functionality.


Detailed Description

Test the MON package watchdog functionality.

**  CVS $Id: mon_test_watchdog.c,v 1.5 2011/03/28 23:52:02 russell Exp $
**  

Function Documentation

int mon_allocate ( test_Test_Descriptor td_p,
mon_Watchdog_Info info_p 
) [static]

Allocate memory for the CPU watchdog tests.

Parameters:
td_p Pointer to test descriptor.
info_p Pointer to watchdog test state.
Return values:
0 Success.
-1 Failure.

References _mon_Watchdog_Info::tcb_p, test_NULL_Compare(), test_Pop_State(), and test_Push_State().

Referenced by mon_test_loading(), and mon_test_watchdog().

int mon_free ( test_Test_Descriptor td_p,
mon_Watchdog_Info info_p 
) [static]

Free memory from the CPU watchdog tests.

Parameters:
td_p Pointer to test descriptor.
info_p Pointer to watchdog test state.
Return values:
0 Success.
-1 Failure.

References mon_stop_load_task(), _mon_Watchdog_Info::tcb_p, test_Pop_State(), test_Push_State(), and test_Value32_Compare().

Referenced by mon_test_loading(), and mon_test_watchdog().

int mon_initialize_wrap ( test_Test_Descriptor td_p,
int  id,
mon_Watchdog_Info info_p 
) [static]

Call MON_initialize() and validate the results.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to watchdog test state.
Return values:
0 Success.
-1 Failure.

References _mon_Watchdog_Info::exp_status, MON_initialize(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().

Referenced by mon_test_control(), mon_test_loading(), mon_test_perf(), and mon_test_watchdog().

void * mon_load_task ( TASK_parameter  parm  )  [static]

Consume all CPU cycles.

Parameters:
parm Pointer to run flag for this task.
Returns:
MSG code.

Referenced by mon_start_load_task().

int mon_set_watchdog_wrap ( test_Test_Descriptor td_p,
int  id,
mon_Watchdog_Info info_p 
) [static]

Call MON_set_watchdog() and validate the results.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to control test state.
Return values:
0 Success.
-1 Failure.

References _mon_Watchdog_Info::exp_status, MON_set_watchdog(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().

Referenced by mon_test_control(), and mon_test_watchdog().

int mon_shutdown_wrap ( test_Test_Descriptor td_p,
int  id,
mon_Watchdog_Info info_p 
) [static]

Call MON_shutdown() and validate the results.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to watchdog test state.
Return values:
0 Success.
-1 Failure.

References _mon_Watchdog_Info::exp_status, MON_shutdown(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().

Referenced by mon_test_control(), mon_test_loading(), mon_test_perf(), and mon_test_watchdog().

int mon_start_db_wrap ( test_Test_Descriptor td_p,
int  id,
mon_Watchdog_Info info_p 
) [static]

Call MON_start_with_db() and validate the results.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to watchdog test state.
Return values:
0 Success.
-1 Failure.

References _mon_Watchdog_Info::exp_status, MON_start_with_db(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().

Referenced by mon_test_control(), and mon_test_watchdog().

int mon_start_load_task ( test_Test_Descriptor td_p,
int  id,
mon_Watchdog_Info info_p 
) [static]

Start a task that consumes all CPU cycles.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to watchdog test state.
Return values:
0 Success.
-1 Failure.

References mon_load_task(), _mon_Watchdog_Info::run, _mon_Watchdog_Info::tcb_p, test_Pop_State(), test_Push_State(), and test_Value32_Compare().

Referenced by mon_test_loading(), and mon_test_watchdog().

int mon_stop_load_task ( test_Test_Descriptor td_p,
mon_Watchdog_Info info_p 
) [static]

Stop a task that is consuming all CPU cycles.

Parameters:
td_p Pointer to test descriptor.
info_p Pointer to watchdog test state.
Return values:
0 Success.
-1 Failure.

References _mon_Watchdog_Info::run, _mon_Watchdog_Info::tcb_p, test_Pop_State(), test_Push_State(), and test_Value32_Compare().

Referenced by mon_free(), and mon_test_loading().

int mon_stop_wrap ( test_Test_Descriptor td_p,
int  id,
mon_Watchdog_Info info_p 
) [static]

Call MON_stop() and validate the results.

Parameters:
td_p Pointer to test descriptor.
id ID to use for user messages.
info_p Pointer to watchdog test state.
Return values:
0 Success.
-1 Failure.

References _mon_Watchdog_Info::exp_status, MON_stop(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().

Referenced by mon_test_control(), mon_test_loading(), mon_test_perf(), and mon_test_watchdog().

void mon_test_watchdog ( test_Test_Descriptor td_p,
const unsigned int  bit_mask 
)


Generated on Fri Sep 30 18:56:22 2011 by  doxygen 1.5.8