@@ -131,29 +131,16 @@ void test_fapi2GetChildren()
131
131
TARGETING::Target * l_proc = nullptr ;
132
132
do
133
133
{
134
- // Create a vector of TARGETING::Target pointers
135
- TARGETING::TargetHandleList l_chipList;
136
-
137
- // Get a list of all of the proc chips
138
- TARGETING::getAllChips (l_chipList, TARGETING::TYPE_PROC, false );
139
-
140
- // Take the first proc and use it
141
- for (uint32_t i = 0 ; i < l_chipList.size (); i++)
134
+ numTests++;
135
+ l_err = getProc (l_nimbusProc, l_cumulusProc);
136
+ if (l_err)
142
137
{
143
- if (TARGETING::MODEL_NIMBUS ==
144
- l_chipList[i]->getAttr <TARGETING::ATTR_MODEL>())
145
- {
146
- l_nimbusProc = l_chipList[i];
147
- break ;
148
- }
149
- if (TARGETING::MODEL_CUMULUS ==
150
- l_chipList[i]->getAttr <TARGETING::ATTR_MODEL>())
151
- {
152
- l_cumulusProc = l_chipList[i];
153
- break ;
154
- }
138
+ errlCommit (l_err,HWPF_COMP_ID);
139
+ numFails++;
140
+ TS_FAIL (" test_fapi2GetChildren Fail: could not find any proc, skipping tests" );
141
+ break ;
155
142
}
156
- numTests++;
143
+
157
144
if (l_nimbusProc != nullptr )
158
145
{
159
146
l_proc = l_nimbusProc;
@@ -164,24 +151,10 @@ void test_fapi2GetChildren()
164
151
}
165
152
else // both are nullptr
166
153
{
167
- // Send an errorlog because we cannot find any NIMBUS procs.
168
- FAPI_ERR (" FAPI2_GETCHILDREN:: could not find any procs, skipping tests" );
154
+ // Should never get here since error should have been returned
155
+ // above
156
+ FAPI_ERR (" test_fapi2GetChildren: Never Should Happen" );
169
157
numFails++;
170
- /* @
171
- * @errortype ERRORLOG::ERRL_SEV_UNRECOVERABLE
172
- * @moduleid fapi2::MOD_FAPI2_PLAT_GET_CHILDREN_TEST
173
- * @reasoncode fapi2::RC_NO_PROCS_FOUND
174
- * @userdata1 Model Type we looked for
175
- * @userdata2 Other Model Type we looked for
176
- * @devdesc Could not find any procs in system model
177
- */
178
- l_err = new ERRORLOG::ErrlEntry (ERRORLOG::ERRL_SEV_UNRECOVERABLE,
179
- fapi2::MOD_FAPI2_PLAT_GET_CHILDREN_TEST,
180
- fapi2::RC_NO_PROCS_FOUND,
181
- TARGETING::MODEL_NIMBUS,
182
- TARGETING::MODEL_CUMULUS,
183
- true /* SW Error*/ );
184
- errlCommit (l_err,HWPF_COMP_ID);
185
158
break ;
186
159
}
187
160
@@ -739,29 +712,15 @@ void test_fapi2GetChildrenFilter()
739
712
{
740
713
FAPI_DBG (" start of test_fapi2GetChildrenFilter()" );
741
714
742
- // Create a vector of TARGETING::Target pointers
743
- TARGETING::TargetHandleList l_chipList;
744
-
745
- // Get a list of all of the proc chips
746
- TARGETING::getAllChips (l_chipList, TARGETING::TYPE_PROC, false );
747
-
748
- // Take the first NIMBUS proc and use it
749
- for (uint32_t i = 0 ; i < l_chipList.size (); i++)
715
+ numTests++;
716
+ l_err = getProc (l_nimbusProc, l_cumulusProc);
717
+ if (l_err)
750
718
{
751
- if (TARGETING::MODEL_NIMBUS ==
752
- l_chipList[i]->getAttr <TARGETING::ATTR_MODEL>())
753
- {
754
- l_nimbusProc = l_chipList[i];
755
- break ;
756
- }
757
- if (TARGETING::MODEL_CUMULUS ==
758
- l_chipList[i]->getAttr <TARGETING::ATTR_MODEL>())
759
- {
760
- l_cumulusProc = l_chipList[i];
761
- break ;
762
- }
719
+ errlCommit (l_err,HWPF_COMP_ID);
720
+ numFails++;
721
+ TS_FAIL (" test_fapi2GetChildrenFilter Fail: could not find any proc, skipping tests" );
722
+ break ;
763
723
}
764
- numTests++;
765
724
766
725
if (l_nimbusProc != nullptr )
767
726
{
@@ -773,10 +732,10 @@ void test_fapi2GetChildrenFilter()
773
732
}
774
733
else // both are nullptr
775
734
{
776
- // Send an errorlog because we cannot find any procs.
777
- FAPI_ERR (" FAPI2_GETCHILDREN:: could not find any proc, skipping tests" );
735
+ // Should never get here since error should have been returned
736
+ // above
737
+ FAPI_ERR (" test_fapi2GetChildrenFilter: Never Should Happen" );
778
738
numFails++;
779
- TS_FAIL (" test_fapi2GetChildrenFilter Fail: could not find any proc, skipping tests" );
780
739
break ;
781
740
}
782
741
0 commit comments