diff options
| author | Dan Crowell <dcrowell@us.ibm.com> | 2017-04-13 15:23:54 -0500 |
|---|---|---|
| committer | William G. Hoffa <wghoffa@us.ibm.com> | 2017-04-28 12:51:15 -0400 |
| commit | aef8993e6d472792f5b70dd6f86013d5665849da (patch) | |
| tree | f855c77bc09ef127933b3c3b5f4f43fe166e380a /src/usr/errl/test | |
| parent | 40643bc86fcbcca5c3199168f36bccc0c0d65383 (diff) | |
| download | talos-hostboot-aef8993e6d472792f5b70dd6f86013d5665849da.tar.gz talos-hostboot-aef8993e6d472792f5b70dd6f86013d5665849da.zip | |
Fix and guarantee order of target to subsys translation table
Change-Id: Idef7e41e358965afc7e670f2f2108742d37532f5
CQ: SW384972
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39262
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/errl/test')
| -rw-r--r-- | src/usr/errl/test/errltest.H | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H index eb756f4f0..8ca85d69a 100644 --- a/src/usr/errl/test/errltest.H +++ b/src/usr/errl/test/errltest.H @@ -47,6 +47,7 @@ #include <targeting/common/utilFilter.H> #include "../../trace/entry.H" +#include "../errlentry_consts.H" #define TEST_SEVERITY ERRORLOG::ERRL_SEV_INFORMATIONAL @@ -1074,6 +1075,29 @@ public: }while(0); #endif } + + /** + * @brief Guarantee TARGET_TO_SUBSYS_TABLE is in order + */ + void testErrl_subsysOrder(void) + { + // TARGET_TO_SUBSYS_TABLE must be sorted by type, this + // test ensures that is true + TARGETING::TYPE l_lastType = TARGET_TO_SUBSYS_TABLE[0].xType; + for( size_t i = 1; //start on 2nd entry + i < (sizeof(TARGET_TO_SUBSYS_TABLE)/ + sizeof(TARGET_TO_SUBSYS_TABLE[0])); + i++ ) + { + if( TARGET_TO_SUBSYS_TABLE[i].xType < l_lastType ) + { + TS_FAIL( "testErrl_subsysOrder> %d is out of order", + TARGET_TO_SUBSYS_TABLE[i].xType ); + } + l_lastType = TARGET_TO_SUBSYS_TABLE[i].xType; + } + } + }; } |

