Skip to content

Commit 42c0894

Browse files
dwashburdcrowell77
authored andcommitted
Enable Unit Tests for variable buffer support.
The unit tests in usr/src/fapi2/test that were witten to test ffdc variable buffer functionality were uncommented as the variable buffer support is now enabled. Change-Id: I7bb78d836807adaf9038f2b6d576879cbf3b6444 RTC: 175239 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42068 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: Prachi Gupta <pragupta@us.ibm.com> Reviewed-by: Roland Veloz <rveloz@us.ibm.com> Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
1 parent 15848f5 commit 42c0894

File tree

3 files changed

+14
-34
lines changed

3 files changed

+14
-34
lines changed

src/usr/fapi2/test/fapi2HwpErrorBufferTest.H

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -373,20 +373,8 @@ fapi_try_exit:
373373

374374
int l_result = -1;
375375

376-
//The generated classes in hwp_ffdc_classes.H are not produced to support
377-
//fapi2::variable_buffer.In order to enable the following test the
378-
//parseErrorInfo.pl script must be configured to use variable buffers.
379-
//To enable variable buffer support ensure that the parseErrorInfo_RUN
380-
//macro in import/hwpf/fapi2/tools/parseErrorInfo.mk is defined to
381-
//include the --use-variable-buffers option as shown below.
382-
//$(C1) $$< --use-variable-buffers --output-dir=$$($(GENERATED)_PATH) ...
383-
384-
//Disable unless parseErrorInfo.pl --use-variable-buffers invoked to
385-
//generate hwp_ffdc_classes.H.
386-
387376
do
388377
{
389-
#if 0
390378
//get a PROC target for this test.
391379
TARGETING::Target *l_procTarget = getProcTarget();
392380

@@ -494,6 +482,8 @@ fapi_try_exit:
494482
l_ct = snprintf(
495483
l_ptr,
496484
l_remain,
485+
(i != 0 && i%4 == 0)?
486+
"\n\t\t Data[%d]: %X ":
497487
", Data[%d]: %X ",
498488
i,
499489
FAPI2_TEST_VARIABLE_BUFFER_VALUE[i]
@@ -536,7 +526,6 @@ fapi_try_exit:
536526
break;
537527
}
538528

539-
#endif
540529
l_result = 0;
541530

542531
}

src/usr/fapi2/test/rcSupport.C

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,18 @@ const uint64_t FAPI2_TEST_BUFFER_VALUE = 0x123456789ABCDEF;
4141
const uint32_t FAPI2_TEST_VARIABLE_BUFFER_VALUE[] =
4242
{
4343
0x12345678,
44-
0x9ABCDEF
44+
0x23456781,
45+
0x34567812,
46+
0x45678123,
47+
0x56781234,
48+
0x67812345,
49+
0x78123456,
50+
0x81234567,
51+
0x9ABCDEF,
52+
0xABCDEF9,
53+
0xBCDEF9A,
54+
0xCDEF9AB,
55+
0xDEF9ABC
4556
};
4657
const uint32_t VARIABLE_BUFFER_ELEMENTS =
4758
sizeof(FAPI2_TEST_VARIABLE_BUFFER_VALUE)/
@@ -210,15 +221,6 @@ fapi_try_exit:
210221
return fapi2::current_err;
211222
}
212223

213-
#if 0
214-
//The generated classes in hwp_ffdc_classes.H are not produced to support
215-
//fapi2::variable_buffer.In order to enable the following function the
216-
//parseErrorInfo.pl script must be configured to use variable buffers.
217-
//To enable variable buffer support ensure that the parseErrorInfo_RUN
218-
//macro in import/hwpf/fapi2/tools/parseErrorInfo.mk is defined to
219-
//include the --use-variable-buffers option as shown below.
220-
//$(C1) $$< --use-variable-buffers --output-dir=$$($(GENERATED)_PATH) ...
221-
//
222224
//****************************************************************************
223225
// p9ErrorWithVariableBuffer
224226
// Force an error that will use a caller populated fapi2::variable_buffer
@@ -251,6 +253,5 @@ fapi_try_exit:
251253
FAPI_INF("Exiting p9ErrorWithVariableBuffer");
252254
return fapi2::current_err;
253255
}
254-
#endif
255256

256257

src/usr/fapi2/test/rcSupport.H

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,11 @@ fapi2::ReturnCode p9_hwCallout(
9292
fapi2::ReturnCode p9ErrorWithBuffer(
9393
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target);
9494

95-
#if 0
96-
//The generated classes in hwp_ffdc_classes.H are not produced to support
97-
//fapi2::variable_buffer.In order to enable the following function the
98-
//parseErrorInfo.pl script must be configured to use variable buffers.
99-
//To enable variable buffer support ensure that the parseErrorInfo_RUN
100-
//macro in import/hwpf/fapi2/tools/parseErrorInfo.mk is defined to
101-
//include the --use-variable-buffers option as shown below.
102-
//$(C1) $$< --use-variable-buffers --output-dir=$$($(GENERATED)_PATH) ...
103-
10495
//*****************************************************************************
10596
// p9ErrorWithVariableBuffer
10697
// Force an error that will use a caller populated fapi2::variable_buffer
10798
//*****************************************************************************
10899
fapi2::ReturnCode p9ErrorWithVariableBuffer(
109100
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target);
110-
#endif
111101

112102
#endif

0 commit comments

Comments
 (0)