diff options
author | Missy Connell <missyc@us.ibm.com> | 2012-12-03 12:13:25 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-03-12 09:43:04 -0500 |
commit | 6a8e78667bd096e41a909273e4359bc62e444992 (patch) | |
tree | 1e2ab1e38223186a62484a766a288d9e604f9692 /src/usr/runtime/test | |
parent | 6a15522c01a44a19ea6af93cdcff8ff76cbaedce (diff) | |
download | talos-hostboot-6a8e78667bd096e41a909273e4359bc62e444992.tar.gz talos-hostboot-6a8e78667bd096e41a909273e4359bc62e444992.zip |
Dump Collect code
RTC:46996
Change-Id: I18863c91dcde353df6201c3c13e101626f24206b
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3131
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/runtime/test')
-rw-r--r-- | src/usr/runtime/test/hdatservicetest.H | 151 |
1 files changed, 77 insertions, 74 deletions
diff --git a/src/usr/runtime/test/hdatservicetest.H b/src/usr/runtime/test/hdatservicetest.H index 8d5dd72de..3b59651f0 100644 --- a/src/usr/runtime/test/hdatservicetest.H +++ b/src/usr/runtime/test/hdatservicetest.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012 */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ /* */ /* p1 */ /* */ @@ -200,103 +200,106 @@ class HdatServiceTest: public CxxTest::TestSuite 0, dump_addr, dump_size ); - if( errhdl && (payload_kind == TARGETING::PAYLOAD_KIND_PHYP) ) + + if( errhdl + && ((payload_kind == TARGETING::PAYLOAD_KIND_PHYP) + || (payload_kind == TARGETING::PAYLOAD_KIND_NONE))) { - if( errhdl ) - { - TS_FAIL("testHdat> Error trying to locate MS_DUMP_SRC_TBL"); - errlCommit(errhdl,RUNTIME_COMP_ID); - } - else if( dump_addr == 0 ) - { - TS_FAIL("testHdat> NULL returned for get_host_data_section(MS_DUMP_SRC_TBL)"); - } - else if( dump_size < 16 ) //1 entry is 16 bytes - { - TRACFCOMP( g_trac_runtime, "testHdat> dump_size=%d", dump_size ); - TS_FAIL("testHdat> Size of MS_DUMP_SRC_TBL data too small"); - } + TS_FAIL("testHdat> Error trying to locate MS_DUMP_SRC_TBL"); + errlCommit(errhdl,RUNTIME_COMP_ID); } - else + else if( !errhdl + && (payload_kind != TARGETING::PAYLOAD_KIND_PHYP) + && (payload_kind != TARGETING::PAYLOAD_KIND_NONE) ) { - if( !errhdl ) - { - TS_FAIL("testHdat> Did not get expected error trying to locate MS_DUMP_SRC_TBL for non-PHYP Payload"); - } - else - { - delete errhdl; - } + TS_FAIL("testHdat> Did not get expected error trying to locate MS_DUMP_SRC_TBL for non-PHYP/Standalone Payload"); + } + else if( ((dump_addr == 0) || (dump_size < 16)) + && (payload_kind != TARGETING::PAYLOAD_KIND_PHYP) + && (payload_kind != TARGETING::PAYLOAD_KIND_NONE) ) + { + TS_FAIL("testHdat> NULL or zero size returned for get_host_data_section(MS_DUMP_SRC_TBL)"); + } + else if( (dump_size <16) + || (dump_size == RUNTIME::DATA_SIZE_UNKNOWN) ) + { + TS_FAIL("testHdat> Size of MS_DUMP_SRC_TBL is unexpected"); + } + if( errhdl ) + { + delete errhdl; } + errhdl = RUNTIME::get_host_data_section( RUNTIME::MS_DUMP_DST_TBL, 0, dump_addr, dump_size ); - if( errhdl && (payload_kind == TARGETING::PAYLOAD_KIND_PHYP) ) + if( errhdl + && ((payload_kind == TARGETING::PAYLOAD_KIND_PHYP) + || (payload_kind == TARGETING::PAYLOAD_KIND_NONE)) ) { - if( errhdl ) - { - TS_FAIL("testHdat> Error trying to locate MS_DUMP_DST_TBL"); - errlCommit(errhdl,RUNTIME_COMP_ID); - } - else if( dump_addr == 0 ) - { - TS_FAIL("testHdat> NULL returned for get_host_data_section(MS_DUMP_DST_TBL)"); - } - else if( dump_size < 16 ) //1 entry is 16 bytes - { - TRACFCOMP( g_trac_runtime, "testHdat> dump_size=%d", dump_size ); - TS_FAIL("testHdat> Size of MS_DUMP_DST_TBL data too small"); - } + TS_FAIL("testHdat> Error trying to locate MS_DUMP_DST_TBL"); + errlCommit(errhdl,RUNTIME_COMP_ID); } - else + else if( !errhdl + && (payload_kind != TARGETING::PAYLOAD_KIND_PHYP) + && (payload_kind != TARGETING::PAYLOAD_KIND_NONE) ) { - if( !errhdl ) - { - TS_FAIL("testHdat> Did not get expected error trying to locate MS_DUMP_DST_TBL for non-PHYP Payload"); - } - else - { - delete errhdl; - } + TS_FAIL("testHdat> Did not get expected error trying to locate MS_DUMP_DST_TBL for non-PHYP/Standalone Payload"); } + else if( ((dump_addr == 0) || (dump_size < 16)) + && (payload_kind != TARGETING::PAYLOAD_KIND_PHYP) + && (payload_kind != TARGETING::PAYLOAD_KIND_NONE) ) + { + TS_FAIL("testHdat> NULL or zero size returned for get_host_data_section(MS_DUMP_DST_TBL)"); + } + else if( (dump_size <16) + || (dump_size == RUNTIME::DATA_SIZE_UNKNOWN) ) + { + TS_FAIL("testHdat> Size of MS_DUMP_DST_TBL is unexpected"); + } + if( errhdl ) + { + delete errhdl; + } + errhdl = RUNTIME::get_host_data_section( RUNTIME::MS_DUMP_RESULTS_TBL, 0, dump_addr, dump_size ); - if( errhdl && (payload_kind == TARGETING::PAYLOAD_KIND_PHYP) ) + + if( errhdl + && ((payload_kind == TARGETING::PAYLOAD_KIND_PHYP) + || (payload_kind == TARGETING::PAYLOAD_KIND_NONE)) ) { - if( errhdl ) - { - TS_FAIL("testHdat> Error trying to locate MS_DUMP_RESULTS_TBL"); - errlCommit(errhdl,RUNTIME_COMP_ID); - } - else if( dump_addr == 0 ) - { - TS_FAIL("testHdat> NULL returned for get_host_data_section(MS_DUMP_RESULTS_TBL)"); - } - else if( dump_size < 16 ) //1 entry is 16 bytes - { - TRACFCOMP( g_trac_runtime, "testHdat> dump_size=%d", dump_size ); - TS_FAIL("testHdat> Size of MS_DUMP_RESULTS_TBL data too small"); - } + TS_FAIL("testHdat> Error trying to locate MS_DUMP_SRC_TBL"); + errlCommit(errhdl,RUNTIME_COMP_ID); } - else + else if( !errhdl + && (payload_kind != TARGETING::PAYLOAD_KIND_PHYP) + && (payload_kind != TARGETING::PAYLOAD_KIND_NONE) ) { - if( !errhdl ) - { - TS_FAIL("testHdat> Did not get expected error trying to locate MS_DUMP_RESULTS_TBL for non-PHYP Payload"); - } - else - { - delete errhdl; - } + TS_FAIL("testHdat> Did not get expected error trying to locate MS_DUMP_RESULTS_TBL for non-PHYP/Standalone Payload"); + } + else if( ((dump_addr == 0) || (dump_size < 16)) + && (payload_kind != TARGETING::PAYLOAD_KIND_PHYP) + && (payload_kind != TARGETING::PAYLOAD_KIND_NONE) ) + { + TS_FAIL("testHdat> NULL or zero size returned for get_host_data_section(MS_DUMP_RESULTS_TBL)"); + } + else if( (dump_size <16) + || (dump_size == RUNTIME::DATA_SIZE_UNKNOWN) ) + { + TS_FAIL("testHdat> Size of MS_DUMP_RESULTS_TBL is unexpected"); + } + if( errhdl ) + { + delete errhdl; } - TRACFCOMP( g_trac_runtime, "testHdat> finish" ); } |