GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > MEM / V5-7-1
Constituent: mem_unit_test     Tag: sun-gcc
#include "ITC/ITC_pubdefs.h"
#include "MEM/MEM_dump.h"
#include "MEM/MEM_load.h"
#include "MEM/MEM_pubdefs.h"
#include "MEM/MEM_tlmdefs.h"
#include "PBS/FPA.h"
#include "PBS/WUT.h"
Include dependency graph for mem_unit_test.h:
This graph shows which files directly or indirectly include this file:
Data Structures | |
struct | _test_Test_Descriptor |
Description of a test state. More... | |
Defines | |
#define | MEM_APID_LAT_MEM_LOAD (0x644) |
Memory Load APID. | |
#define | MEM_APID_LAT_MEM_DUMP (0x644) |
Memory Dump APID. | |
#define | MEM_FC_MEM_LOAD_MEMORY (4) |
Memory Write function code. | |
#define | MEM_FC_MEM_LOAD_PCI (5) |
PCI Device Header Write function code. | |
#define | MEM_FC_MEM_LOAD_REGISTER (6) |
CPU Register Write function code. | |
#define | MEM_FC_MEM_DUMP_MEMORY (0) |
Memory Dump function code. | |
#define | MEM_FC_MEM_DUMP_PCI (2) |
PCI Device Header Dump function code. | |
#define | MEM_FC_MEM_DUMP_REGISTER (3) |
CPU Register Dump function code. | |
#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. | |
int | test_Delay (const test_Test_Descriptor *td_p, const unsigned int num_msecs) |
Delay the current task a number of milliseconds. | |
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_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_Status_Compare (const test_Test_Descriptor *td_p, const unsigned int expect, const unsigned int actual, const char *func) |
Check a status value returned from a MEM library function. | |
int | test_Status_Success (const test_Test_Descriptor *td_p, const unsigned int actual, const char *func) |
Check a MSG status code to make sure it's reporting success. | |
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_Descriptor_Compare (const test_Test_Descriptor *td_p, const MEM_Descriptor *expect, const MEM_Descriptor *actual, const char *desc) |
Verify the contents of a memory descriptor. | |
int | test_LoadInfo_Compare (const test_Test_Descriptor *td_p, const MEM_LoadInfo *expect, MEM_LoadInfo *actual) |
Verify the contents of a MEM_LoadInfo object. | |
int | test_DumpInfo_Compare (const test_Test_Descriptor *td_p, const MEM_DumpInfo *expect, MEM_DumpInfo *actual) |
Verify the contents of a MEM_DumpInfo object. | |
void | test_Show_Tlm (const test_Test_Descriptor *td_p, const MEM_LMEMSIUDATA_Tlm *expect, const MEM_LMEMSIUDATA_Tlm *actual) |
Display the contents of a dump telemetry packet. | |
int | test_DumpTlm_Compare (const test_Test_Descriptor *td_p, const MEM_LMEMSIUDATA_Tlm *expect, const MEM_LMEMSIUDATA_Tlm *actual, const char *desc) |
Verify the contents of dump telemetry packet. | |
int | test_Info_Compare (const test_Test_Descriptor *td_p, const MEM_Info *expect, MEM_Info *actual, const char *desc) |
Verify the contents of a MEM_Info object. | |
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. | |
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. | |
void | test_Show_Dump_Progress (const test_Test_Descriptor *td_p, const char *name, const size_t chunk_size, const caddr_t addr, const size_t progress, const size_t full_size) |
Display dump progress. | |
void | test_PrnFill32 (void *startAddr, const unsigned long nWords) |
PRN fill. | |
unsigned long | test_PrnVerify32 (const void *startAddr, const unsigned long nWords, unsigned long *firstFailure, unsigned long *expect, unsigned long *found) |
PRN verify. | |
void | mem_Control_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Unit test for Memory Control functions. | |
void | mem_CreateDescriptor_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Unit test for memory descriptor creation. | |
void | mem_DumpContext_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Unit test for Memory Dump context operations. | |
void | mem_DumpMemory_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Unit test for nominal Memory Dump operations. | |
void | mem_DumpParam_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Test for Memory Dump bad parameter handling. | |
void | mem_DumpPCI_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Unit test for PCI configuration dump. | |
void | mem_DumpRegSet_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Unit test for CPU register Memory Dump operation. | |
void | mem_DumpWrap_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Unit test for wrapped Memory Dump operation. | |
void | mem_LoadContext_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Unit test for Memory Load context operations. | |
void | mem_LoadMemory_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Unit test for Memory Write telecommands. | |
void | mem_LoadParam_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Test for Memory Load bad parameter handling. | |
void | mem_LoadSize_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Unit test for Memory Write telecommands. | |
void | mem_MapBuild_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Test memory map table construction. | |
void | mem_RamAccess_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Unit test for RAM memory loads and dumps. | |
void | mem_ValidateMemoryRange_test (test_Test_Descriptor *td_p, const unsigned int bit_mask) |
Unit test of Mem_ValidateMemoryRange(). |
CVS $Id: mem_unit_test.h,v 1.8 2006/05/10 19:35:49 dmay Exp $
Interface to the common mem_unit_test functions.
|
Unit test for Memory Control functions. Verify the handling of Memory Control operations.
|
|
Unit test for memory descriptor creation. Run unit test for memory descriptor creation. Test the creation of memory descriptors from memory dump and load commands.
|
|
Unit test for Memory Dump context operations. Verify the handling of Memory Dump context 'get', 'release', and 'info' operations.
|
|
Unit test for nominal Memory Dump operations. This test runs two simultaneous dumps (to test re-entrant interfaces). A local memory buffer is targeted for the dump. This data is dumped to the "dest" members of the mem_DumpInfo structures used to control the dumps. Two dumps are run (firstDump and secondDump). The target memory of these dumps overlap.
|
|
Test for Memory Dump bad parameter handling. Verify the handling of bad parameters by the Memory Dump functions.
|
|
Unit test for PCI configuration dump. Run unit test for PCI configuration memory dumps. Test the nominal dump operations, no extensive error handling done in this test. The following features are tested:
The following features are assumed to work:
|
|
Unit test for CPU register Memory Dump operation. This test runs a dump of the CPU registers. A local memory buffer is targeted for the dump. This data is dumped to the "dest" member of the mem_DumpInfo structure used to control the dump.
|
|
Unit test for wrapped Memory Dump operation. This test runs a single dump that wraps the source buffer a number of times. A local memory buffer is targeted for the dump. This data is dumped to the "dest" member of the mem_DumpInfo structure used to control the dump.
|
|
Unit test for Memory Load context operations. Verify the handling of Memory Load context 'get', 'release', and 'info' operations.
|
|
Unit test for Memory Write telecommands. Verify the handling of Memory Write telecommands.
|
|
Test for Memory Load bad parameter handling. Verify the handling of bad parameters by the Memory Load functions.
|
|
Unit test for Memory Write telecommands. Verify the handling of Memory Write telecommands with various amounts of data.
|
|
Test memory map table construction. Verify the functions that build memory maps.
|
|
Unit test for RAM memory loads and dumps.
|
|
Unit test of Mem_ValidateMemoryRange(). Run unit test for Mem_ValidateMemoryRange(). Driven by the table of unit tests defined in mem_ValMemRangeTestData.
|
|
Delay the current task a number of milliseconds.
|
|
Verify the contents of a memory descriptor. This function verifies the contents of a memory descriptor and reports an error if the values are not as expected.
|
|
Verify the contents of a MEM_DumpInfo object. This function verifies the contents of a MEM_DumpInfo object and reports an error if the values are not as expected.
|
|
Verify the contents of dump telemetry packet.
|
|
Display a generic error message.
|
|
Verify the contents of a MEM_Info object. This function verifies the contents of a MEM_Info object and reports an error if the values are not as expected.
|
|
Verify the contents of a MEM_LoadInfo object. This function verifies the contents of a MEM_LoadInfo object and reports an error if the values are not as expected.
|
|
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.
|
|
Check a 32-bit value to make sure it is not NULL.
|
|
Return for a test state. Pop a test state description from a test's state stack.
|
|
PRN fill. Fills a buffer in memory with a pseudo-random sequence of numbers. The PRN is based on this polynomial: 8 7 5 3 h(x) = x + x + x + x + 1
|
|
PRN verify. Verifies a pseudo-random sequence of numbers and reports number of errors found and details about the first error. The PRN is based on this polynomial: 8 7 5 3 h(x) = x + x + x + x + 1
|
|
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.
|
|
Display text with indentation. Display text with indentation appropriate for the specified level.
|
|
Display dump progress. This function displays the progress of a dump.
|
|
Display an item of data. This function displays an item of data in a predefined format.
|
|
Indicate that the next error message is expected. Display text that indicates that the next error message is expected.
|
|
Display the contents of a dump telemetry packet.
|
|
Check a status value returned from a MEM library function. Compare actual and expected status values returned from a MEM library function and display a message if they differ.
|
|
Check a MSG status code to make sure it's reporting success.
|
|
Check a 32-bit value. Compare actual and expected 32-bit values and display a message if they differ.
|