GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LIM / dev > lim_unit_test / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

lim_test_pool.c File Reference

Test the LIM package pool functions. More...

#include <string.h>
#include <ITC/ITC_pubdefs.h>
#include <LIM/LIM_msgs.h>
#include <MSG/MSG_pubdefs.h>
#include <LIM/../src/LIM_pool.h>
#include <lim_unit_test.h>

Classes

struct  _lim_Pool_Info
 LIM pool test state. More...

Typedefs

typedef struct _lim_Pool_Info lim_Pool_Info
 Typedef for _lim_Pool_Info.

Functions

static int lim_init_wrap (test_Test_Descriptor *td_p, int id, lim_Pool_Info *info_p)
 Call LIM_pool_init() and validate the results.
static int lim_shutdown_wrap (test_Test_Descriptor *td_p, int id, lim_Pool_Info *info_p)
 Call LIM_poolshutdown() and validate the results.
static int lim_alloc_wrap (test_Test_Descriptor *td_p, int id, lim_Pool_Info *info_p)
 Call LIM_pool_alloc() and validate the results.
static void lim_free_cb (ITC_QueueItem *qitem_p, unsigned int status_in, void *parm_0, void *parm_1, void *parm_2, unsigned int tx)
 Callback for LIM memory pool packet frees.
static int lim_free_wrap (test_Test_Descriptor *td_p, int id, lim_Pool_Info *info_p)
 Call pool free routine and validate the results.
void lim_test_pool (test_Test_Descriptor *td_p, const unsigned int bit_mask)
 Unit test for LIM pool functions.


Detailed Description

Test the LIM package pool functions.

**  CVS $Id: lim_test_pool.c,v 1.8 2011/03/30 22:23:43 apw Exp $
**  

Function Documentation

int lim_alloc_wrap ( test_Test_Descriptor td_p,
int  id,
lim_Pool_Info info_p 
) [static]

Call LIM_pool_alloc() and validate the results.

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

References _lim_Pool_Info::act_alloc_rv, _lim_Pool_Info::cb_parm_0_p, _lim_Pool_Info::cb_parm_1_p, _lim_Pool_Info::cb_parm_2_p, _lim_Pool_Info::exp_alloc_rv, _lim_Pool_Info::free_cb_p, LIM_pool_alloc(), _lim_Pool_Info::pool_ctl_p, _lim_Pool_Info::size, test_NULL_Compare(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Value32_Compare().

Referenced by lim_test_pool().

void lim_free_cb ( ITC_QueueItem *  qitem_p,
unsigned int  status_in,
void *  parm_0,
void *  parm_1,
void *  parm_2,
unsigned int  tx 
) [static]

Callback for LIM memory pool packet frees.

Parameters:
qitem_p Pointer to queue item.
status_in Completion code.
parm_0 Callback parameter 0 (unused).
parm_1 Callback parameter 1 (unused).
parm_2 Callback parameter 2 (location to store status_in).
tx Flag indicating sender-side failure (unused).
Returns:
Nothing.

Referenced by lim_test_pool().

int lim_free_wrap ( test_Test_Descriptor td_p,
int  id,
lim_Pool_Info info_p 
) [static]

Call pool free routine and validate the results.

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

References _lim_Pool_Info::act_free_sts_in, _lim_Pool_Info::cb_parm_0, _lim_Pool_Info::cb_parm_1, _lim_Pool_Info::cb_parm_2, _lim_Pool_Info::exp_free_sts_in, _lim_Pool_Info::exp_status, _lim_Pool_Info::free_cb, test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().

Referenced by lim_test_pool().

int lim_init_wrap ( test_Test_Descriptor td_p,
int  id,
lim_Pool_Info info_p 
) [static]

Call LIM_pool_init() and validate the results.

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

References _lim_Pool_Info::exp_status, LIM_pool_init(), _lim_Pool_Info::num_pkts, _lim_Pool_Info::pkt_bytes, _lim_Pool_Info::pool_ctl_pp, test_NULL_Compare(), test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), test_Status_Compare(), and test_Value32_Compare().

Referenced by lim_test_pool().

int lim_shutdown_wrap ( test_Test_Descriptor td_p,
int  id,
lim_Pool_Info info_p 
) [static]

Call LIM_poolshutdown() and validate the results.

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

References _lim_Pool_Info::exp_status, LIM_pool_shutdown(), _lim_Pool_Info::pool_ctl_p, test_Pop_State(), test_Push_State(), test_Show_Msg_OK(), and test_Status_Compare().

Referenced by lim_test_pool().

void lim_test_pool ( test_Test_Descriptor td_p,
const unsigned int  bit_mask 
)


Generated on Wed Mar 30 15:28:22 2011 by  doxygen 1.5.8