summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDonald Washburn <dwashbur@us.ibm.com>2017-06-19 14:44:08 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-06-21 16:20:21 -0400
commit42c0894cc119110570ce68859e0b8daed53ea9c4 (patch)
treeb1abe273f6421afdaa2fc7c17b8ec3d92beeda9d /src
parent15848f53e13cb9192e53355a9aeb3ad1ddbf7ae6 (diff)
downloadtalos-hostboot-42c0894cc119110570ce68859e0b8daed53ea9c4.tar.gz
talos-hostboot-42c0894cc119110570ce68859e0b8daed53ea9c4.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/usr/fapi2/test/fapi2HwpErrorBufferTest.H15
-rw-r--r--src/usr/fapi2/test/rcSupport.C23
-rw-r--r--src/usr/fapi2/test/rcSupport.H10
3 files changed, 14 insertions, 34 deletions
diff --git a/src/usr/fapi2/test/fapi2HwpErrorBufferTest.H b/src/usr/fapi2/test/fapi2HwpErrorBufferTest.H
index ab9811ccf..6b6e0706f 100644
--- a/src/usr/fapi2/test/fapi2HwpErrorBufferTest.H
+++ b/src/usr/fapi2/test/fapi2HwpErrorBufferTest.H
@@ -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();
@@ -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]
@@ -536,7 +526,6 @@ fapi_try_exit:
break;
}
-#endif
l_result = 0;
}
diff --git a/src/usr/fapi2/test/rcSupport.C b/src/usr/fapi2/test/rcSupport.C
index 537f8567f..84ecb84e6 100644
--- a/src/usr/fapi2/test/rcSupport.C
+++ b/src/usr/fapi2/test/rcSupport.C
@@ -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)/
@@ -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
@@ -251,6 +253,5 @@ fapi_try_exit:
FAPI_INF("Exiting p9ErrorWithVariableBuffer");
return fapi2::current_err;
}
-#endif
diff --git a/src/usr/fapi2/test/rcSupport.H b/src/usr/fapi2/test/rcSupport.H
index 1968bcf2f..e2e22fa3e 100644
--- a/src/usr/fapi2/test/rcSupport.H
+++ b/src/usr/fapi2/test/rcSupport.H
@@ -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
OpenPOWER on IntegriCloud