GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > MEM / V3-1-0

Constituent: mem_unit_test     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

mem_test_map.c File Reference

Test the memory map functions. More...

#include "MEM/MEM.h"
#include "MEM/MEM_map.h"
#include "MEM/MEM_msgs.h"
#include "mempriv.h"
#include "mem_test_map.h"
#include "mem_unit_test.h"

Include dependency graph for mem_test_map.c:

Include dependency graph

Data Structures

struct  _mem_MapInfo
 Memory map test information. More...


Defines

#define mem_ACCESS_NAME(__d__)
 Convert a memory access type to a text string.


Typedefs

typedef _mem_MapInfo mem_MapInfo
 Typedef for _mem_MapInfo.


Functions

int mem_mapInit_wrap (test_Test_Descriptor *td_p, int id, mem_MapInfo *info_p)
 Start the Memory Map interface and verify the results.

int mem_mapAddEntry_wrap (test_Test_Descriptor *td_p, int id, mem_MapInfo *info_p)
 Add an entry to the Memory Map and verify the results.

void mem_MapBuild_test (test_Test_Descriptor *td_p, const unsigned int bit_mask)
 Test memory map table construction.

void mem_ValidateMemoryRange_test (test_Test_Descriptor *td_p, const unsigned int bit_mask)
 Unit test of Mem_ValidateMemoryRange().


Variables

struct {
   const char *   testName
   MEM_Memmap   map
   MEM_mapAccessType   access
   caddr_t   sa
   size_t   bytes
   unsigned int   expect
mem_ValMemRangeTestData
 Memory range test data.


Detailed Description

Test the memory map functions.

  CVS $Id: mem_test_map.c,v 1.2 2004/06/29 14:40:29 dmay Exp $
  

Test the operation of the memory map functions.


Define Documentation

#define mem_ACCESS_NAME __d__   ) 
 

Value:

( ((__d__) == MEM_MAP_ACCESS_READ_32)   ? "READ_32"   : \
    ( ((__d__) == MEM_MAP_ACCESS_WRITE_32)  ? "WRITE_32"  : \
    ( ((__d__) == MEM_MAP_ACCESS_READ_16)   ? "READ_16"   : \
    ( ((__d__) == MEM_MAP_ACCESS_WRITE_16)  ? "WRITE_16"  : \
    ( ((__d__) == MEM_MAP_ACCESS_READ_8)    ? "READ_8"    : \
    ( ((__d__) == MEM_MAP_ACCESS_WRITE_8)   ? "WRITE_8"   : \
    ( ((__d__) == MEM_MAP_ACCESS_READ_ANY)  ? "READ_ANY"  : \
    ( ((__d__) == MEM_MAP_ACCESS_WRITE_ANY) ? "WRITE_ANY" : \
    ( ((__d__) == MEM_MAP_ACCESS_32)        ? "ANY_32"    : \
    ( ((__d__) == MEM_MAP_ACCESS_16)        ? "ANY_16"    : \
    ( ((__d__) == MEM_MAP_ACCESS_8)         ? "ANY_8"     : \
    ( ((__d__) == MEM_MAP_ACCESS_ANY)       ? "ANY"       : \
                                              "UNKNOWN"   ))))))))))))
Convert a memory access type to a text string.


Function Documentation

int mem_mapAddEntry_wrap test_Test_Descriptor td_p,
int  id,
mem_MapInfo info_p
[static]
 

Add an entry to the Memory Map and verify the results.

Wrapper for the MEM_mapAddEntry() function that validates the results.

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

Here is the call graph for this function:

void mem_MapBuild_test test_Test_Descriptor td_p,
const unsigned int  bit_mask
 

Test memory map table construction.

Verify the functions that build memory maps.

Parameters:
td_p Pointer to test descriptor.
bit_mask Bitmask ID for this subtest.
Returns:
Nothing.

Here is the call graph for this function:

int mem_mapInit_wrap test_Test_Descriptor td_p,
int  id,
mem_MapInfo info_p
[static]
 

Start the Memory Map interface and verify the results.

Wrapper for the MEM_mapInit() function that validates the results.

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

Here is the call graph for this function:

void mem_ValidateMemoryRange_test test_Test_Descriptor td_p,
const unsigned int  bit_mask
 

Unit test of Mem_ValidateMemoryRange().

Run unit test for Mem_ValidateMemoryRange(). Driven by the table of unit tests defined in mem_ValMemRangeTestData.

Parameters:
td_p Pointer to test descriptor.
bit_mask Bitmask ID for this subtest.
Returns:
Nothing.

Here is the call graph for this function:


Variable Documentation

mem_ValMemRangeTestData[]
 

Memory range test data.

Each item in this table contains a test case for the Mem_ValidateMemoryRange() function.


Generated on Mon Dec 13 07:36:31 2004 by doxygen 1.3.3