From d87aceae2d5e5cb66201af5f897b06fa1471d90e Mon Sep 17 00:00:00 2001 From: Stephen Cprek Date: Mon, 20 Mar 2017 13:07:42 -0500 Subject: Add PNOR SectionIdToString to replace direct access to cv_EYECATCHER This catches if the const array size does not match the number of pnor sections and out of range index errors Also it adds genErrlParsing for bootloader files Change-Id: I0a90816a7620022dec16bc7358a68ffbdade0083 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38159 Reviewed-by: Martin Gloff Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Tested-by: Jenkins OP Build CI Reviewed-by: Michael Baiocchi Reviewed-by: Nicholas E. Bofferding Reviewed-by: William G. Hoffa --- src/usr/testcore/rtloader/loader.H | 4 ++-- src/usr/testcore/rtloader/makefile | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/usr/testcore/rtloader') diff --git a/src/usr/testcore/rtloader/loader.H b/src/usr/testcore/rtloader/loader.H index 417009992..f131d9a7e 100644 --- a/src/usr/testcore/rtloader/loader.H +++ b/src/usr/testcore/rtloader/loader.H @@ -42,10 +42,10 @@ #include #include #include +#include trace_desc_t* g_trac_hbrt = NULL; TRAC_INIT(&g_trac_hbrt, "HBRT_TEST", 2*KILOBYTE); -extern const char* cv_EYECATCHER[]; class RuntimeLoaderTest : public CxxTest::TestSuite { @@ -347,7 +347,7 @@ class RuntimeLoaderTest : public CxxTest::TestSuite for (size_t i=PNOR::FIRST_SECTION; i<=PNOR::NUM_SECTIONS; ++i) { - if (0 == strcmp(cv_EYECATCHER[i], i_partitionName)) + if (0 == strcmp(PNOR::SectionIdToString(i), i_partitionName)) { l_id = (PNOR::SectionId)i; break; diff --git a/src/usr/testcore/rtloader/makefile b/src/usr/testcore/rtloader/makefile index c75e71933..d253d3f06 100644 --- a/src/usr/testcore/rtloader/makefile +++ b/src/usr/testcore/rtloader/makefile @@ -5,7 +5,9 @@ # # OpenPOWER HostBoot Project # -# COPYRIGHT International Business Machines Corp. 2011,2014 +# Contributors Listed Below - COPYRIGHT 2011,2017 +# [+] International Business Machines Corp. +# # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,6 +24,8 @@ # IBM_PROLOG_END_TAG ROOTPATH = ../../../.. +EXTRAINCDIR += ${ROOTPATH}/src/usr/pnor/ + MODULE = testrtloader TESTS = *.H -- cgit v1.2.3