From e59e01da049d2b864ff7cb1dd03b82e5a8a393b9 Mon Sep 17 00:00:00 2001 From: Mike Jones Date: Tue, 13 Sep 2011 11:44:54 -0500 Subject: HWPF: Add support for new System Config Query functions Change-Id: I00220dc4a1ee4f630138d0ed87a943053a7a93d5 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/337 Tested-by: Jenkins Server Reviewed-by: Andrew J. Geissler Reviewed-by: Monte K. Copeland Reviewed-by: MIKE J. JONES --- src/usr/hwpf/test/hwpftest.H | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'src/usr/hwpf/test') diff --git a/src/usr/hwpf/test/hwpftest.H b/src/usr/hwpf/test/hwpftest.H index 3cf7095e4..eaf2fbc36 100644 --- a/src/usr/hwpf/test/hwpftest.H +++ b/src/usr/hwpf/test/hwpftest.H @@ -76,8 +76,8 @@ public: } /** - * @brief Test HWPF: call a test procedure that generates an error - */ + * @brief Test HWPF: call a test procedure that generates an error + */ void testHwpf2() { // Call a test hardware procedure @@ -103,6 +103,37 @@ public: TS_FAIL("testHwpf2: Unit Test failed. hwpTestError passed. Error logged"); } } + + /** + * @brief Test HWPF Config: call a test procedure that exercises the FAPI + * config query functions + */ + void testHwpf3() + { + errlHndl_t l_err = NULL; + + // Get the master processor chip + TARGETING::Target* l_pTarget = NULL; + TARGETING::targetService().masterProcChipTargetHandle(l_pTarget); + + // Create a FAPI Target and invoke the hwpTestConfig HWP. The HWP + // exercises the FAPI config query functions + fapi::Target l_fapiTarget(TARGET_TYPE_PROC_CHIP, + reinterpret_cast (l_pTarget)); + + FAPI_INVOKE_HWP(l_err, hwpTestConfig, l_fapiTarget); + + if (l_err) + { + TS_FAIL("testHwpf3: Unit Test failed. hwpTestConfig failed. Error logged"); + errlCommit(l_err); + } + else + { + TS_TRACE("testHwpf3: Unit Test failed. hwpTestConfig passed. Error logged"); + } + } + }; #endif -- cgit v1.2.3