diff options
| author | Missy Connell <missyc@us.ibm.com> | 2012-04-25 14:29:54 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-05-09 10:59:46 -0500 |
| commit | 91d3c3f897bdeb6bab4259eafaa42b24b669b1d2 (patch) | |
| tree | 4426f49054ec0119e04099250032c68bed3bcf55 /src | |
| parent | 7362a70f4b11b12578c938cb40a0143f6bfeda7d (diff) | |
| download | blackbird-hostboot-91d3c3f897bdeb6bab4259eafaa42b24b669b1d2.tar.gz blackbird-hostboot-91d3c3f897bdeb6bab4259eafaa42b24b669b1d2.zip | |
Update testcases to use Attributes for present and functional
Update testcases for scom, i2c, mvpd, fsi
Change-Id: I357c4efb046c04da1c801ec257a1827e36a73e25
RTC: 39765
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/943
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/usr/fsi/test/fsiddtest.H | 13 | ||||
| -rwxr-xr-x | src/usr/i2c/test/eepromddtest.H | 17 | ||||
| -rwxr-xr-x | src/usr/i2c/test/i2ctest.H | 32 | ||||
| -rwxr-xr-x | src/usr/mvpd/test/mvpdtest.H | 100 | ||||
| -rw-r--r-- | src/usr/scom/test/scomtest.H | 56 |
5 files changed, 203 insertions, 15 deletions
diff --git a/src/usr/fsi/test/fsiddtest.H b/src/usr/fsi/test/fsiddtest.H index 3078e4261..c1e528741 100644 --- a/src/usr/fsi/test/fsiddtest.H +++ b/src/usr/fsi/test/fsiddtest.H @@ -230,27 +230,32 @@ class FsiDDTest : public CxxTest::TestSuite uint64_t patterns_to_run = 0; for( uint64_t x = 0; x < NUM_ADDRS; x++ ) { + // direct writes to slave regs if( test_data[x].fsitarget == PROC0 ) { if( ((0xFF0000 & test_data[x].addr) == 0x080000) - && FSI::isSlavePresent(fsi_targets[PROCWRAP]) ) + && (fsi_targets[PROCWRAP] != NULL) + && (fsi_targets[PROCWRAP]->getAttr<TARGETING::ATTR_HWAS_STATE>().functional)) { test_data[x].present = true; } else if( ((0xFF0000 & test_data[x].addr) == 0x040000) - && FSI::isSlavePresent(fsi_targets[CENTAUR0]) ) + && (fsi_targets[CENTAUR0] != NULL) + && (fsi_targets[CENTAUR0]->getAttr<TARGETING::ATTR_HWAS_STATE>().functional)) { test_data[x].present = true; } else if( ((0xFF0000 & test_data[x].addr) == 0x100000) - && FSI::isSlavePresent(fsi_targets[PROC2]) ) + && (fsi_targets[PROC2] != NULL) + && (fsi_targets[PROC2]->getAttr<TARGETING::ATTR_HWAS_STATE>().functional)) { test_data[x].present = true; } } // otherwise only talk to chips that we see - else if( FSI::isSlavePresent(fsi_targets[test_data[x].fsitarget]) ) + else if (( fsi_targets[test_data[x].fsitarget] != NULL) && + (fsi_targets[test_data[x].fsitarget]->getAttr<TARGETING::ATTR_HWAS_STATE>().functional)) { test_data[x].present = true; } diff --git a/src/usr/i2c/test/eepromddtest.H b/src/usr/i2c/test/eepromddtest.H index 0e8ceae73..5c622a7f5 100755 --- a/src/usr/i2c/test/eepromddtest.H +++ b/src/usr/i2c/test/eepromddtest.H @@ -133,8 +133,9 @@ class EEPROMTest: public CxxTest::TestSuite for( uint32_t j = 0; j < fullList.size(); j++ ) { - // Skip this target if EEPROM isn't available. - if( !isI2CAvailable( fullList[j] ) ) + // Skip this target if EEPROM isn't available. or if non functional + if( !isI2CAvailable( fullList[j] ) || + !fullList[j]->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) { continue; } @@ -215,8 +216,10 @@ class EEPROMTest: public CxxTest::TestSuite tS.masterProcChipTargetHandle( testTarget ); assert(testTarget != NULL); - // Skip this target if EEPROM isn't available. - if( !isI2CAvailable( testTarget ) ) + // Skip this target if EEPROM isn't available or target is non + // functional + if( !isI2CAvailable( testTarget ) || + !testTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) { continue; } @@ -267,8 +270,10 @@ class EEPROMTest: public CxxTest::TestSuite tS.masterProcChipTargetHandle( testTarget ); assert(testTarget != NULL); - // Skip this target if EEPROM isn't available. - if( !isI2CAvailable( testTarget ) ) + // Skip this target if EEPROM isn't available. or target is non + // functional + if( !isI2CAvailable( testTarget ) || + !testTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) { continue; } diff --git a/src/usr/i2c/test/i2ctest.H b/src/usr/i2c/test/i2ctest.H index e1933ac62..95f1cc16d 100755 --- a/src/usr/i2c/test/i2ctest.H +++ b/src/usr/i2c/test/i2ctest.H @@ -219,6 +219,22 @@ class I2CTest: public CxxTest::TestSuite // Check to see if I2C function is there if( !isI2CAvailable( theTarget ) ) { + TRACFCOMP( g_trac_i2c, + "testI2ReadWrite Operation - no i2c function" ); + + + continue; + } + + // check to see if the target is functional before we + // continue.. + if + (!theTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) + { + + TRACFCOMP( g_trac_i2c, + "testI2ReadWrite Operation - target not functional" ); + continue; } @@ -332,6 +348,22 @@ class I2CTest: public CxxTest::TestSuite // Check to see if I2C function is there if( !isI2CAvailable( testTarget ) ) { + TRACFCOMP( g_trac_i2c, + "testI2CInvalid Operation - no i2c function" ); + + + continue; + } + + // check to see if the target is functional before we + // continue.. + if + (!testTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) + { + TRACFCOMP( g_trac_i2c, + "testI2CInvalide Operation - not functional" ); + + continue; } diff --git a/src/usr/mvpd/test/mvpdtest.H b/src/usr/mvpd/test/mvpdtest.H index adca80fd2..0e8d902ff 100755 --- a/src/usr/mvpd/test/mvpdtest.H +++ b/src/usr/mvpd/test/mvpdtest.H @@ -248,11 +248,24 @@ class MVPDTest: public CxxTest::TestSuite { TRACFCOMP( g_trac_mvpd, "testMvpdRead() - No Proc Targets found!" ); + + continue; // add continue because have no proc targets } // Use the first Proc in the list theTarget = procList[0]; + // check to see if the target is functional + if + (!theTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) + { + + TRACFCOMP( g_trac_mvpd, + "testMvpdRead() - Proc Target [0] non functional!" ); + + continue; // add continue because target is non functional + } + uint8_t * theData = NULL; size_t theSize = 0; const uint32_t numCmds = sizeof(mvpdData)/sizeof(mvpdData[0]); @@ -342,10 +355,24 @@ class MVPDTest: public CxxTest::TestSuite { TRACFCOMP( g_trac_mvpd, "testMvpdWrite() - No Proc Targets found!" ); + + continue; // no proc targets. } // Use the first Proc in the list theTarget = procList[0]; + + // check to see if the target is functional + if + (!theTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) + { + + TRACFCOMP( g_trac_mvpd, + "testMvpdRead() - Proc Target [0] non functional!" ); + + continue; // add continue because target is non functional + } + uint8_t * theData = NULL; size_t theSize = 0; @@ -402,10 +429,24 @@ class MVPDTest: public CxxTest::TestSuite TRACFCOMP( g_trac_mvpd, "testMvpdInvalidRecord() - No Proc Targets " "found!" ); + + continue; } // Use the first Proc in the list theTarget = procList[0]; + + // check to see if the target is functional + if + (!theTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) + { + + TRACFCOMP( g_trac_mvpd, + "testMvpdRead() - Proc Target [0] non functional!" ); + + continue; // add continue because target is non functional + } + uint8_t * theData = NULL; size_t theSize = 0; @@ -461,11 +502,26 @@ class MVPDTest: public CxxTest::TestSuite ( NULL == procList[0] ) ) { TRACFCOMP( g_trac_mvpd, + "testMvpdMissingRecord() - No Proc Targets found!" ); + + continue; } // Use the first Proc in the list theTarget = procList[0]; + + // check to see if the target is functional + if + (!theTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) + { + + TRACFCOMP( g_trac_mvpd, + "testMvpdRead() - Proc Target [0] non functional!" ); + + continue; // add continue because target is non functional + } + uint8_t * theData = NULL; size_t theSize = 0; @@ -518,11 +574,26 @@ class MVPDTest: public CxxTest::TestSuite ( NULL == procList[0] ) ) { TRACFCOMP( g_trac_mvpd, + "testMvpdMissingKeyword() - No Proc Targets found!" ); + + continue; } // Use the first Proc in the list theTarget = procList[0]; + + // check to see if the target is functional + if + (!theTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) + { + + TRACFCOMP( g_trac_mvpd, + "testMvpdRead() - Proc Target [0] non functional!" ); + + continue; // add continue because target is non functional + } + uint8_t * theData = NULL; size_t theSize = 0; @@ -577,11 +648,26 @@ class MVPDTest: public CxxTest::TestSuite ( NULL == procList[0] ) ) { TRACFCOMP( g_trac_mvpd, + "testMvpdInvalidKeyword() - No Proc Targets found!" ); + + continue; } // Use the first Proc in the list theTarget = procList[0]; + + // check to see if the target is functional + if + (!theTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) + { + + TRACFCOMP( g_trac_mvpd, + "testMvpdRead() - Proc Target [0] non functional!" ); + + continue; // add continue because target is non functional + } + uint8_t * theData = NULL; size_t theSize = 0; @@ -639,10 +725,24 @@ class MVPDTest: public CxxTest::TestSuite TRACFCOMP( g_trac_mvpd, "testMvpdInvalidBufferSize() - No Proc Targets " "found!" ); + + continue; } // Use the first Proc in the list theTarget = procList[0]; + + // check to see if the target is functional + if + (!theTarget->getAttr<TARGETING::ATTR_HWAS_STATE>().functional) + { + + TRACFCOMP( g_trac_mvpd, + "testMvpdRead() - Proc Target [0] non functional!" ); + + continue; // add continue because target is non functional + } + uint8_t * theData = NULL; size_t theSize = 0; diff --git a/src/usr/scom/test/scomtest.H b/src/usr/scom/test/scomtest.H index 066dcaca6..29eeec729 100644 --- a/src/usr/scom/test/scomtest.H +++ b/src/usr/scom/test/scomtest.H @@ -101,9 +101,9 @@ public: TRACDCOMP( g_trac_scom, "ScomTest::test_FSISCOMreadWrite_proc> useFsiScom set to zero on target %d", x ); scom_targets[x] = NULL; //remove from our list } - else if( !FSI::isSlavePresent(scom_targets[x]) ) + else if (scom_targets[x]->getAttr<TARGETING::ATTR_HWAS_STATE>().functional != true) { - TRACDCOMP( g_trac_scom, "ScomTest::test_FSISCOMreadWrite_proc> Target %d is not present", x ); + TRACDCOMP( g_trac_scom, "ScomTest::test_FSISCOMreadWrite_proc> Target %d is not functional", x ); scom_targets[x] = NULL; //remove from our list } } @@ -243,9 +243,9 @@ public: TRACDCOMP( g_trac_scom, "ScomTest::test_FSISCOMreadWrite_centaur> useFsiScom set to zero on target %d", x ); scom_targets[x] = NULL; //remove from our list } - else if( !FSI::isSlavePresent(scom_targets[x]) ) + else if (scom_targets[x]->getAttr<TARGETING::ATTR_HWAS_STATE>().functional != true) { - TRACDCOMP( g_trac_scom, "ScomTest::test_FSISCOMreadWrite_centaur> Target %d is not present", x ); + TRACDCOMP( g_trac_scom, "ScomTest::test_FSISCOMreadWrite_centaur> Target %d is not functional", x ); scom_targets[x] = NULL; //remove from our list } } @@ -389,6 +389,12 @@ public: TRACDCOMP(g_trac_scom, "INDIRECT SCOM>> SKIPPING "); scom_targets[x] = NULL; //remove from our list } + else if (scom_targets[x]->getAttr<TARGETING::ATTR_HWAS_STATE>().functional != true) + { + TRACDCOMP( g_trac_scom, "ScomTest::test_FSISCOMreadWrite_centaur> Target %d is not functional", x ); + scom_targets[x] = NULL; //remove from our list + } + } @@ -570,6 +576,13 @@ public: { continue; } + // check to see if the target is functional.. if not.. skip this target + else if (test_data[x].target->getAttr<TARGETING::ATTR_HWAS_STATE>().functional != true) + { + TRACDCOMP( g_trac_scom, "ScomTest::test_translate_scom_EX> Target %d is not functional", x ); + continue; + } + op_size = sizeof(uint64_t); @@ -750,6 +763,12 @@ public: { continue; } + // check to see if the target is functional.. if not.. skip this target + else if (test_data[x].target->getAttr<TARGETING::ATTR_HWAS_STATE>().functional != true) + { + TRACDCOMP( g_trac_scom, "ScomTest::test_translate_scom_MCS> Target %d is not functional", x ); + continue; + } op_size = sizeof(uint64_t); @@ -929,6 +948,13 @@ public: continue; } + // check to see if the target is functional.. if not.. skip this target + else if (test_data[x].target->getAttr<TARGETING::ATTR_HWAS_STATE>().functional != true) + { + TRACDCOMP( g_trac_scom, "ScomTest::test_translate_scom_MCS_DMI> Target %d is not functional", x ); + continue; + } + op_size = sizeof(uint64_t); total++; @@ -1093,6 +1119,13 @@ public: continue; } + // check to see if the target is functional.. if not.. skip this target + else if (test_data[x].target->getAttr<TARGETING::ATTR_HWAS_STATE>().functional != true) + { + TRACDCOMP( g_trac_scom, "ScomTest::test_translate_scom_MBA_MBS> Target %d is not functional", x ); + continue; + } + op_size = sizeof(uint64_t); total++; @@ -1105,7 +1138,7 @@ public: // checking the read of NUM_ADDRs - 1 because the last entry written above failed as expected. if ((x == NUM_ADDRS-1) || (x==NUM_ADDRS-2)) { - TRACDCOMP( g_trac_scom, "ScomTest::test_translate MCS.. Expected Errorlog Returned> x = %d", x ); + TRACDCOMP( g_trac_scom, "ScomTest::test_translate MBA_MBS.. Expected Errorlog Returned> x = %d", x ); } else { @@ -1274,6 +1307,13 @@ public: continue; } + // check to see if the target is functional.. if not.. skip this target + else if (test_data[x].target->getAttr<TARGETING::ATTR_HWAS_STATE>().functional != true) + { + TRACDCOMP( g_trac_scom, "ScomTest::test_translate_scom_ABUS> Target %d is not functional", x ); + continue; + } + op_size = sizeof(uint64_t); total++; @@ -1453,6 +1493,12 @@ public: { continue; } + // check to see if the target is functional.. if not.. skip this target + else if (test_data[x].target->getAttr<TARGETING::ATTR_HWAS_STATE>().functional != true) + { + TRACDCOMP( g_trac_scom, "ScomTest::test_translate_scom_XBUS> Target %d is not functional", x ); + continue; + } op_size = sizeof(uint64_t); |

