diff options
author | Mark Wenning <wenning@us.ibm.com> | 2011-10-03 15:10:32 -0500 |
---|---|---|
committer | Mark W. Wenning <wenning@us.ibm.com> | 2011-10-06 18:45:15 -0500 |
commit | 5f0e665d50726bbd1617259b583d56bef67cd87f (patch) | |
tree | 6e667066189a1b2ce01d9e420d0028902f925b8b /src | |
parent | 7c7734c033bed0a453623afa980d38efd791c9a2 (diff) | |
download | talos-hostboot-5f0e665d50726bbd1617259b583d56bef67cd87f.tar.gz talos-hostboot-5f0e665d50726bbd1617259b583d56bef67cd87f.zip |
Fixes to cxxtest, + add debug for trace
- cxxtestgen.pl was counting the tests wrong
(did not reset # tests between suites)
- to be continued...
Change-Id: Ic060bcaf38dee39a620b3bef7c651851547442dc
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/423
Tested-by: Jenkins Server
Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-x | src/include/usr/cxxtest/TestSuite.H | 2 | ||||
-rw-r--r-- | src/include/usr/trace/interface.H | 2 | ||||
-rw-r--r-- | src/usr/cxxtest/cxxtestexec.C | 8 | ||||
-rwxr-xr-x | src/usr/cxxtest/cxxtestgen.pl | 11 | ||||
-rw-r--r-- | src/usr/cxxtest/test/cxxtesttest.H | 1 | ||||
-rw-r--r-- | src/usr/errl/test/errltest.H | 21 |
6 files changed, 31 insertions, 14 deletions
diff --git a/src/include/usr/cxxtest/TestSuite.H b/src/include/usr/cxxtest/TestSuite.H index 4288ccc6e..e62141093 100755 --- a/src/include/usr/cxxtest/TestSuite.H +++ b/src/include/usr/cxxtest/TestSuite.H @@ -33,7 +33,7 @@ /******************************************************************************/ // Includes /******************************************************************************/ -#include <stdint.h> +#include <stdint.h> #include <trace/interface.H> diff --git a/src/include/usr/trace/interface.H b/src/include/usr/trace/interface.H index a082aaa1d..9e04c5afb 100644 --- a/src/include/usr/trace/interface.H +++ b/src/include/usr/trace/interface.H @@ -276,7 +276,7 @@ tracepp replaces trace_adal_hash() with hash value and reduced format string * buffer to write to. * * @param des This is assigned by this function. - * @param comp_name This is the four character name of the component requesting + * @param comp_name This is the 15 character name of the component requesting * the trace buffer. * @param bufferSize Requested length of the buffer, if 0 is entered the user will * get default buffer size. diff --git a/src/usr/cxxtest/cxxtestexec.C b/src/usr/cxxtest/cxxtestexec.C index a120ed6eb..58540c3ff 100644 --- a/src/usr/cxxtest/cxxtestexec.C +++ b/src/usr/cxxtest/cxxtestexec.C @@ -70,9 +70,13 @@ void _start(void *io_pArgs) TaskArgs::TaskArgs *pTaskArgs = reinterpret_cast<TaskArgs::TaskArgs *>(io_pArgs); + // output a blank line so that it's easier to find the beginning of + // CxxTest + TRACDCOMP( g_trac_cxxtest, " "); + TRACDCOMP( g_trac_cxxtest, " "); // count up the number of viable modules ahead of time - TRACDCOMP( g_trac_cxxtest, "Counting CxxTextExec modules:" ); + TRACDCOMP( g_trac_cxxtest, "Counting CxxTestExec modules:" ); VFS::find_test_modules(module_list); @@ -80,8 +84,10 @@ void _start(void *io_pArgs) // start executing the CxxTest modules + TRACDCOMP( g_trac_cxxtest, ENTER_MRK "Execute CxxTestExec, totalmodules=%d.", totalmodules); + printkd( "\n Begin CxxTest...\n"); // set barrier for all the modules being started, plus this module barrier_init( &CxxTest::g_CxxTestBarrier, totalmodules+1 ); diff --git a/src/usr/cxxtest/cxxtestgen.pl b/src/usr/cxxtest/cxxtestgen.pl index 98e9135fc..c4b5bafef 100755 --- a/src/usr/cxxtest/cxxtestgen.pl +++ b/src/usr/cxxtest/cxxtestgen.pl @@ -654,15 +654,15 @@ sub writeHostBootSuites() { my ( $suitecount, $suitevar, $testcount ); $suitecount = 1; # initialize suite count - $testcount = 0; # initialize test count + ## $$TODO print "\tTaskArgs *pTaskArgs = (TaskArgs *)ptr;\n"; foreach (@suites) { $suite = $_; - $suitevar = "l_ex$suitecount"; # Make up the suite variable name - + $testcount = 0; # 0 test count between each suite + ## writeInclude(fileName()); if ( $debug ) { @@ -693,7 +693,7 @@ sub writeHostBootSuites() { ## run each of the tests in the list foreach (@{suiteTests()}) { $test = $_; - if ( $debug ) { print "\tprintk(\"Executing test module ", testName(), ".\\n\");\n"; } + print "\tprintkd(\"CxxTest: Executing ", suiteName(), " ", testName(), ".\\n\");\n"; printf "\t$suitevar->%s();\n\n", testName(); $testcount++; } @@ -712,8 +712,9 @@ sub writeHostBootSuites() { print "\tCxxTest::reportTotalTests( \"", suiteName(), "\", $testcount );\n"; print "\n"; + $suitecount++; # bump to the next suite - } + } ## end foreach } ## diff --git a/src/usr/cxxtest/test/cxxtesttest.H b/src/usr/cxxtest/test/cxxtesttest.H index 0c925aea3..381c99e6d 100644 --- a/src/usr/cxxtest/test/cxxtesttest.H +++ b/src/usr/cxxtest/test/cxxtesttest.H @@ -58,6 +58,7 @@ public: uint64_t l_bighex = 0x1234567890abcdef; l_bighex--; l_bighex++; + TS_TRACE( "CxxTest Trace" ); TS_TRACE( "CxxTest Trace dec=%d", l_dec ); TS_TRACE( "CxxTest Trace hex=0x%x", l_hex ); TS_TRACE( "CxxTest Trace bighex=0x%llx", l_bighex ); diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H index b1d105215..0ac45d019 100644 --- a/src/usr/errl/test/errltest.H +++ b/src/usr/errl/test/errltest.H @@ -72,9 +72,9 @@ public: // the two 64-bit user data parameters in the error log. // l_userData1 = 16bit(0):l_bit8_1:l_bit8_2:l_32bit_1 uint8_t l_8bit_1 = TEST_USR_8BIT_1; // 0x80 - uint8_t l_8bit_2 = TEST_USR_8BIT_2; // 0x93 + uint8_t l_8bit_2 = TEST_USR_8BIT_2; // 0x93 uint32_t l_32bit_1 = TEST_USR_32BIT_1; // 0x80000001 - uint64_t l_userData1 = + uint64_t l_userData1 = TWO_UINT32_TO_UINT64( TO_UINT32(TWO_UINT8_TO_UINT16(l_8bit_1, l_8bit_2)), l_32bit_1); // yields 0x0000809380000001 @@ -86,6 +86,8 @@ public: uint64_t l_userData2 = TWO_UINT16_ONE_UINT32_TO_UINT64(l_16bit_1, l_16bit_2, l_32bit_2); // yields 0x8000900390000003 + TRACDCOMP( g_trac_test, "testErrl1"); + TS_TRACE( "testErrl1, Create error log..."); // Create an error log errlHndl_t l_err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_INFORMATIONAL, @@ -106,6 +108,7 @@ public: // but errlffdc.H is not publicly includable to give me the definition // for it. addFFDC() should return a Boolean indication of success. + TS_TRACE( "Add ffdc1"); const char * pch = "martha washington"; pffdc = l_err->addFFDC( ERRL_COMP_ID, pch, strlen( pch ), 1, 2 ); if ( NULL == pffdc ) @@ -113,20 +116,23 @@ public: TS_FAIL("testErrl1: addFFDC() output NULL pointer"); } - pch = "george washington"; + TS_TRACE( "Add ffdc2"); + pch = "george washington"; pffdc = l_err->addFFDC( DEVFW_COMP_ID, pch, strlen( pch ), 3, 4 ); if ( NULL == pffdc ) { TS_FAIL("testErrl1: addFFDC() output NULL pointer"); } - pch = "dwight eisenhour"; + TS_TRACE( "Add ffdc3"); + pch = "dwight eisenhour"; pffdc = l_err->addFFDC( SCOM_COMP_ID, pch, strlen( pch ), 5, 6 ); if ( NULL == pffdc ) { TS_FAIL("testErrl1: addFFDC() output NULL pointer"); } + TS_TRACE( "Add ffdc4"); pch = "ronald "; pffdc = l_err->addFFDC( ERRL_COMP_ID, pch, strlen( pch ), 7, 8 ); if ( NULL == pffdc ) @@ -134,19 +140,21 @@ public: TS_FAIL("testErrl1: addFFDC() output NULL pointer"); } + TS_TRACE( "Append ffdc1"); // Append data to something already added. pch = "reagan"; l_err->appendToFFDC( pffdc, pch, strlen(pch) ); // Add null data. + TS_TRACE( "Append ffdc2"); pffdc = l_err->addFFDC( ERRL_COMP_ID, NULL, 0, 9, 10 ); if ( NULL != pffdc ) { TS_FAIL("testErrl1: addFFDC() returned non null"); } - - + + @@ -208,6 +216,7 @@ public: uint64_t l_userData2 = TWO_UINT32_TO_UINT64(TO_UINT32(l_8bit_1), TO_UINT32(l_16bit_1)); + TS_TRACE( "testErrl2"); // Create an error log errlHndl_t l_err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, |