From 052182c0de15d0d3ce3ffc06100f6b60459704ed Mon Sep 17 00:00:00 2001 From: Matt Derksen Date: Wed, 10 Jul 2019 09:20:45 -0500 Subject: [PATCH] Test runtime scom support in Axone Needed to disable i2c explorer command tests during runtime. Currently just support mmio operations for runtime. Change-Id: Ifd2888b1deb03b76408b03516a9dd030896e1ee1 RTC:210321 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/80236 Tested-by: Jenkins Server Reviewed-by: Christian R Geddes Tested-by: FSP CI Jenkins Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Roland Veloz Reviewed-by: Daniel M Crowell --- src/makefile | 2 +- src/usr/cxxtest/TestSuite.C | 5 +++-- src/usr/expaccess/expaccess.mk | 2 +- src/usr/expaccess/runtime/test/makefile | 3 --- src/usr/expaccess/test/expscomtest.H | 13 ++++++++++--- src/usr/expaccess/test/makefile | 2 -- src/usr/expaccess/test/test.mk | 7 +++++++ 7 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/makefile b/src/makefile index c05e71078db..49534fa0ddc 100644 --- a/src/makefile +++ b/src/makefile @@ -350,7 +350,7 @@ RUNTIME_TESTCASE_MODULES += testtargeting_rt RUNTIME_TESTCASE_MODULES += testsbeio_rt RUNTIME_TESTCASE_MODULES += testpm_rt RUNTIME_TESTCASE_MODULES += testrsvdtracebuf_rt -# RUNTIME_TESTCASE_MODULES += testexpaccess_rt +RUNTIME_TESTCASE_MODULES += testexpaccess_rt RELOCATABLE_IMAGE_LDFLAGS = -pie --export-dynamic diff --git a/src/usr/cxxtest/TestSuite.C b/src/usr/cxxtest/TestSuite.C index 92feb4886d1..6f7e3fb2a5b 100755 --- a/src/usr/cxxtest/TestSuite.C +++ b/src/usr/cxxtest/TestSuite.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2017 */ +/* Contributors Listed Below - COPYRIGHT 2011,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -115,10 +115,11 @@ void doFailTest( ) void doFailTest( const char *filename, uint32_t linenum ) { - TRACDCOMP( g_trac_test, + TRACFCOMP( g_trac_test, "!!! > Test %s Failed at line %d ", filename, linenum ); + if(g_FailedTests < CXXTEST_FAIL_LIST_SIZE) { memcpy(g_FailedTestList[g_FailedTests].failTestFile, diff --git a/src/usr/expaccess/expaccess.mk b/src/usr/expaccess/expaccess.mk index 34a56d0f6dc..d71b7e591f6 100644 --- a/src/usr/expaccess/expaccess.mk +++ b/src/usr/expaccess/expaccess.mk @@ -33,7 +33,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2 VPATH += ${ROOTPATH}/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/inband/ -# Need to build exp_indband to use EKB's getMMIO/putMMIO/getCMD/getRSP +# Need to build exp_inband to use EKB's getMMIO/putMMIO/getCMD/getRSP OBJS += exp_inband.o OBJS += expscom_trace.o OBJS += expscom_utils.o diff --git a/src/usr/expaccess/runtime/test/makefile b/src/usr/expaccess/runtime/test/makefile index 442fc095380..3359dc7606b 100644 --- a/src/usr/expaccess/runtime/test/makefile +++ b/src/usr/expaccess/runtime/test/makefile @@ -30,9 +30,6 @@ MODULE = testexpaccess_rt include ../../test/test.mk -#TODO RTC:196806 re-enable mmio communication tests when mmio works TESTS = ../../test/expscomtest.H include ${ROOTPATH}/config.mk - - diff --git a/src/usr/expaccess/test/expscomtest.H b/src/usr/expaccess/test/expscomtest.H index 6da7d53b103..274ce0bb790 100644 --- a/src/usr/expaccess/test/expscomtest.H +++ b/src/usr/expaccess/test/expscomtest.H @@ -42,8 +42,8 @@ #include #include #include "exptest_utils.H" +#include "../expscom_trace.H" -extern trace_desc_t* g_trac_expscom; using namespace TARGETING; using namespace ERRORLOG; @@ -120,6 +120,8 @@ public: */ void testExpscomI2c(void) { +// Only MMIO supported at runtime +#ifndef __HOSTBOOT_RUNTIME TRACFCOMP( g_trac_expscom, ">> Enter testExpscomI2c"); // Keep trace of pass/fails uint32_t l_tests = 0; @@ -272,8 +274,8 @@ public: // << atomic section mutex_unlock(iv_serializeTestMutex); }while(0); - TRACFCOMP( g_trac_expscom, "<< Exit testExpscomI2c"); +#endif return; } @@ -282,6 +284,8 @@ public: */ void testExpscomI2cPlatform(void) { +// Only mmio supported at runtime +#ifndef __HOSTBOOT_RUNTIME TRACFCOMP( g_trac_expscom, ">> Enter testExpscomI2cPlatform"); // Keep trace of pass/fails uint32_t l_tests = 0; @@ -434,6 +438,7 @@ public: }while(0); TRACFCOMP( g_trac_expscom, "<< Exit testExpscomI2cPlatform"); +#endif return; } @@ -620,6 +625,8 @@ public: */ void testExpscomCombined(void) { +// Only MMIO scoms supported at runtime, i2c not supported +#ifndef __HOSTBOOT_RUNTIME TargetHandleList l_explorerList; uint32_t l_tests = 0; uint32_t l_fails = 0; @@ -796,7 +803,7 @@ public: }while(0); TRACFCOMP(g_trac_expscom, "<< Exit testExpscomCombined"); - +#endif return; } diff --git a/src/usr/expaccess/test/makefile b/src/usr/expaccess/test/makefile index 41706b719cf..0e4f0e2e5bf 100644 --- a/src/usr/expaccess/test/makefile +++ b/src/usr/expaccess/test/makefile @@ -28,8 +28,6 @@ MODULE = testexpaccess include test.mk -OBJS += exptest_utils.o - TESTS = *.H include ${ROOTPATH}/config.mk diff --git a/src/usr/expaccess/test/test.mk b/src/usr/expaccess/test/test.mk index 059efe27d77..5aaeeda6637 100644 --- a/src/usr/expaccess/test/test.mk +++ b/src/usr/expaccess/test/test.mk @@ -30,6 +30,13 @@ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/ocmb/explorer/procedures/hwp/memory/ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/ocmb/explorer/procedures/hwp/memory/ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/ocmb/explorer/common/include EXTRAINCDIR += ${ROOTPATH}/src/import +EXTRAINCDIR += ${ROOTPATH}/src/usr/expaccess/ +EXTRAINCDIR += ${ROOTPATH}/src/usr/expaccess/test/ + +VPATH += ${ROOTPATH}/src/usr/expaccess/test/ +VPATH += ${ROOTPATH}/src/usr/expaccess/ + +OBJS += exptest_utils.o include ${ROOTPATH}/config.mk