Skip to content

Commit

Permalink
Enable Unit Tests for variable buffer support.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dwashbur authored and dcrowell77 committed Jun 21, 2017
1 parent 15848f5 commit 42c0894
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 34 deletions.
15 changes: 2 additions & 13 deletions src/usr/fapi2/test/fapi2HwpErrorBufferTest.H
Expand Up @@ -373,20 +373,8 @@ fapi_try_exit:

int l_result = -1;

//The generated classes in hwp_ffdc_classes.H are not produced to support
//fapi2::variable_buffer.In order to enable the following test the
//parseErrorInfo.pl script must be configured to use variable buffers.
//To enable variable buffer support ensure that the parseErrorInfo_RUN
//macro in import/hwpf/fapi2/tools/parseErrorInfo.mk is defined to
//include the --use-variable-buffers option as shown below.
//$(C1) $$< --use-variable-buffers --output-dir=$$($(GENERATED)_PATH) ...

//Disable unless parseErrorInfo.pl --use-variable-buffers invoked to
//generate hwp_ffdc_classes.H.

do
{
#if 0
//get a PROC target for this test.
TARGETING::Target *l_procTarget = getProcTarget();

Expand Down Expand Up @@ -494,6 +482,8 @@ fapi_try_exit:
l_ct = snprintf(
l_ptr,
l_remain,
(i != 0 && i%4 == 0)?
"\n\t\t Data[%d]: %X ":
", Data[%d]: %X ",
i,
FAPI2_TEST_VARIABLE_BUFFER_VALUE[i]
Expand Down Expand Up @@ -536,7 +526,6 @@ fapi_try_exit:
break;
}

#endif
l_result = 0;

}
Expand Down
23 changes: 12 additions & 11 deletions src/usr/fapi2/test/rcSupport.C
Expand Up @@ -41,7 +41,18 @@ const uint64_t FAPI2_TEST_BUFFER_VALUE = 0x123456789ABCDEF;
const uint32_t FAPI2_TEST_VARIABLE_BUFFER_VALUE[] =
{
0x12345678,
0x9ABCDEF
0x23456781,
0x34567812,
0x45678123,
0x56781234,
0x67812345,
0x78123456,
0x81234567,
0x9ABCDEF,
0xABCDEF9,
0xBCDEF9A,
0xCDEF9AB,
0xDEF9ABC
};
const uint32_t VARIABLE_BUFFER_ELEMENTS =
sizeof(FAPI2_TEST_VARIABLE_BUFFER_VALUE)/
Expand Down Expand Up @@ -210,15 +221,6 @@ fapi_try_exit:
return fapi2::current_err;
}

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


10 changes: 0 additions & 10 deletions src/usr/fapi2/test/rcSupport.H
Expand Up @@ -92,21 +92,11 @@ fapi2::ReturnCode p9_hwCallout(
fapi2::ReturnCode p9ErrorWithBuffer(
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target);

#if 0
//The generated classes in hwp_ffdc_classes.H are not produced to support
//fapi2::variable_buffer.In order to enable the following function the
//parseErrorInfo.pl script must be configured to use variable buffers.
//To enable variable buffer support ensure that the parseErrorInfo_RUN
//macro in import/hwpf/fapi2/tools/parseErrorInfo.mk is defined to
//include the --use-variable-buffers option as shown below.
//$(C1) $$< --use-variable-buffers --output-dir=$$($(GENERATED)_PATH) ...

//*****************************************************************************
// p9ErrorWithVariableBuffer
// Force an error that will use a caller populated fapi2::variable_buffer
//*****************************************************************************
fapi2::ReturnCode p9ErrorWithVariableBuffer(
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target);
#endif

#endif

0 comments on commit 42c0894

Please sign in to comment.