diff options
| author | Dan Crowell <dcrowell@us.ibm.com> | 2012-04-03 15:35:56 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-04-27 13:15:05 -0500 |
| commit | abaf491814fa70cb24193eff4fae91919a25de4d (patch) | |
| tree | 691622ddefdd666d5a849fc27a979d0efd9ef46f /src/usr/targeting/common/test | |
| parent | f373d5d3ed00d94202f2b32d75f1066ff4727938 (diff) | |
| download | talos-hostboot-abaf491814fa70cb24193eff4fae91919a25de4d.tar.gz talos-hostboot-abaf491814fa70cb24193eff4fae91919a25de4d.zip | |
Attribute Dump Debug Func
You can request a dump of all attributes for a given target
using the HUID as the key. The command also allows you to
specify which trace buffer the output should go into.
Synopsis
hb-AttrDump ["options"]
Options:
huid HUID of target to dump (default is to dump all targets).
trace Trace buffer to use (default=g_trac_targ).
debug More debug output.
force Run command even if state does not appear correct.
Ex: dump the attributes for sys0node0proc0 into FSIR trace
hb-AttrDump "huid=0x00070001 trace=g_trac_fsir"
RTC: 35202
Change-Id: Iab3b50af025f203bd5184481462603de9b4bc1a9
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/912
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/common/test')
| -rw-r--r-- | src/usr/targeting/common/test/testcommontargeting.H | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/src/usr/targeting/common/test/testcommontargeting.H b/src/usr/targeting/common/test/testcommontargeting.H index e16671633..37430fdb2 100644 --- a/src/usr/targeting/common/test/testcommontargeting.H +++ b/src/usr/targeting/common/test/testcommontargeting.H @@ -50,11 +50,9 @@ #include <targeting/common/trace.H> #include "unittest.H" -//trace_desc_t* g_trac_targeting = NULL; -//TRAC_INIT(&g_trac_targeting, "TARG", 4096); - namespace TARGETING { -extern void dumpAllAttributes(trace_desc_t*); +extern void dumpAllAttributes(TARG_TD_t,uint32_t); +extern TARG_TD_t g_trac_targeting; }; class CommonTargetingTestSuite: public CxxTest::TestSuite @@ -66,10 +64,10 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite */ void testTargetServiceClass() { - //@fixme - found a Data Storage Exception that needs to be fixed (Task + //@fixme - found a Data Storage Exception that needs to be fixed (Task // RTC 35625) return; - + TARG_TS_TRACE(ENTER_MRK "testTargetServiceClass" ); using namespace TARGETING; @@ -1352,8 +1350,8 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite TARG_TS_TRACE(ENTER_MRK "testStringAttributes" ); using namespace TARGETING; - - do { + + do { TargetService& l_targetService = targetService(); @@ -1390,7 +1388,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite { TARG_TS_FAIL("ERROR: Can not read l_nullString attribute"); } - + // TC1.4: All bytes of the string must match the reference version if(memcmp(l_nullStringReference, l_nullString, @@ -1409,9 +1407,9 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite { TARG_TS_FAIL("ERROR: l_nullString does not strcmp to the empty string"); TARG_BIN("Actual (l_nullString)", - l_nullString,sizeof(l_nullString)); + l_nullString,sizeof(l_nullString)); } - + // TC2: Test string attribute with only 1 character // TC2.1: String storage size must match the stated size ATTR_TEST_MIN_STRING_type l_minStringReference = {0}; @@ -1425,7 +1423,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite ATTR_TEST_MIN_STRING_max_chars+1); } - // TC2.2: String size must be non-zero + // TC2.2: String size must be non-zero if(sizeof(l_minString) == 0) { TARG_TS_FAIL("ERROR: l_minString size is zero"); @@ -1436,8 +1434,8 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite { TARG_TS_FAIL("ERROR: Can not read l_minString attribute"); } - - // TC2.4: All bytes in string must match the reference string + + // TC2.4: All bytes in string must match the reference string if(memcmp(l_minStringReference, l_minString, sizeof(l_minStringReference))) @@ -1456,7 +1454,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite TARG_TS_FAIL("ERROR l_minString does not strcmp to the reference " "string"); TARG_BIN("Actual (l_minString)", - l_minString,sizeof(l_minString)); + l_minString,sizeof(l_minString)); } // TC3: Test string with maximum number of characters (including NULL) @@ -1505,7 +1503,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite TARG_TS_FAIL("ERROR: l_maxString does not strcmp to the reference " "string"); TARG_BIN("Actual (l_maxString)", - l_maxString,sizeof(l_maxString)); + l_maxString,sizeof(l_maxString)); } // TC4: Test string with no supplied default value @@ -1553,7 +1551,7 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite TARG_TS_FAIL("ERROR: l_noDefaultString does not strcmp to the reference " "string"); TARG_BIN("Actual (l_noDefaultString)", - l_noDefaultString,sizeof(l_noDefaultString)); + l_noDefaultString,sizeof(l_noDefaultString)); } // TC5: Write string and read back @@ -1587,12 +1585,6 @@ class CommonTargetingTestSuite: public CxxTest::TestSuite TARG_TS_TRACE(EXIT_MRK "testStringAttributes" ); } - - void testDump() - { - //fixme-remove this completely when RTC:38386 is done - //TARGETING::dumpAllAttributes(g_trac_targeting); - } }; #endif // __TARGETING_COMMON_TESTCOMMONTARGETING_H |

